分页查询优化

    技术2025-04-14  9

    一般的分页查询 SELECT * FROM table LIMIT [offset,] rows | rows OFFSET offset

    如果深分页查询语句为:select * from orders_history where type=8 limit 1000000,100;

    select * from orders_history where type=8 and id>=(select id from orders_history where type=8 limit 100000,1)  limit 100;

    Processed: 0.011, SQL: 9