2.变通方法:先查询出一页的主键Id,然后In语句查询,速度稍慢,性能主要损耗在先查Id上;但很方便,对于现有程序改动最小。
select *
from goods
where id in(
select id from (
select id
from goods
limit 63660,20
) tt
)
至于为何要在in语句里又包了一层临时表,因为mysql语法限制在in语句不能使用limit。
ps:由于保护项目的隐私,以上查询用了星号。
转自:http://fenglongsheng.com/post/10270.html
关于mysql表中有大文本limit慢的优化
标签:pos -o wrap nbsp 记录 theme setting 比较 解决方案