- select * from userinfo limit 20000,10 # 数据越往后越慢
- 索引表中扫:
select * from userinfo where id in (select id from userinfo limit 20000,10) # 也慢
- select * from userinfo where id > 20000 limit 10 # 快,但需记录当前页记录的id
- select * from userinfo limit 20000,10 # 数据越往后越慢
- 索引表中扫:
select * from userinfo where id in (select id from userinfo limit 20000,10) # 也慢
- select * from userinfo where id > 20000 limit 10 # 快,但需记录当前页记录的id