mysql分页查询优化

mysql分页查询优化
当limit基数大的时候 查询速度会变得很慢 这个时候一般

mysql> select a.* from member as a inner join (select id from member where gender=1 limit 300000,1) as b on a.id=b.id;
+--------+------------+--------+
| id     | name       | gender |
+--------+------------+--------+
| 599465 | f48375bdb8 |      1 |
+--------+------------+--------+
1 row in set (0.08 sec)

原创文章如转载,请注明本文链接: http://newmiracle.cn/?p=1748

发表评论

电子邮件地址不会被公开。 必填项已用*标注