首页 > Web开发 > 详细

PHP分页优化

时间:2015-03-18 17:42:10      阅读:364      评论:0      收藏:0      [点我收藏+]
最快
select id,name,content,time,re_id,is_replay from tb_content where re_id = 0  and id between 19993 and 19998 order by id desc
大于10000条以上用
select id,name,content,time,re_id,is_replay from tb_content where re_id = 0 and id >=(select id from tb_content where re_id = 0 limit 19992, 1)  limit 6
少于10000条用
select id,name,content,time,re_id,is_replay from tb_content where re_id = 0  limit 19987, 6

 

PHP分页优化

原文:http://www.cnblogs.com/flying-tx/p/4347644.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!