mysql5.6改进子查询实测试

时间:2014-08-15 14:20:59   收藏:0   阅读:192

表t1,t2

各自生成100万条记录。

表引擎  myiasm  ,查询语句

select * from t1 where id2 in (select id2 from t2 )

 

查询速度 2.x秒

查询语句

select t1.* from t1,t2 where t1.id2=t2.id2

查询速度2.x秒

=======================

同样的查询在5.0.x版本速度分别是

2.x秒

7.x秒

===================

速度提高了3倍的样子(和数据有关系)

======================

再使用innodb引擎。

速度最慢也有4.8秒的样子。

确实有优化。

 

mysql5.6改进子查询实测试,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!