mysql大数据量分页查询优化

select * from delivery_trade_query  where merchant_id = 4 order by id limit 1000000,100;

select * from delivery_trade_query d where d.merchant_id = 4 and d.id >= (select id from delivery_trade_query where merchant_id = 4 order by id limit 1000000,1) order by id limit 100;

 

posted @ 2018-08-17 16:05  浪味仙人  阅读(149)  评论(0编辑  收藏  举报