您的位置:首页 > 博客中心 > 数据库 >

mysql5.6改进子查询实测试

时间:2022-03-13 22:48

表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

热门排行

今日推荐

热门手游