Home > Database > Mysql Tutorial > body text

MySQL 单查询性能比较的真相

WBOY
Release: 2016-06-07 17:34:04
Original
989 people have browsed it

根据morgo的建议suggested by morgo我对 Impact of column types on MySQL JOIN performance一文中提到的查询及数据集做了一些小

根据morgo的建议我对 Impact of column types on MySQL JOIN performance一文中提到的查询及数据集做了一些小测试,,但是却发现另一个层面的问题:响应时间 (aka MySQL versions).

The answer

简单的说。作为名优秀的咨询师,这些结论都是有前提的 :-)

The test

查询语句如下:

SELECT *
  FROM a
  JOIN b ON b.a_id = a.id
 WHERE a.id BETWEEN 10000 AND 15000
;

以下所有测试都基于相同的查询语句

MySQL相关的参数设置如下。我还需要考虑 join buffer或是其他的单会话的buffers (read_buffer_size,read_rnd_buffer_size,join_buffer_size)么?

innodb_buffer_pool_size        = 768M
innodb_buffer_pool_instances  = 1
innodb_file_per_table          = 1

The results

The Graph

the_truth.png

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!