PHP分页优化

最快
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
相关文章
相关标签/搜索