mysql limit 偏移量过大效率解决方式 转贴

半世苍凉 提交于 2019-11-30 02:47:44

原文地址:https://www.jianshu.com/p/f8d81df7ab28

SELECT * FROM product 
WHERE ID > =(select id from product limit 866613, 1) limit 20
SELECT * FROM product a 
JOIN (select id from product limit 866613, 20) b ON a.ID = b.id

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!