array(2) { ["docs"]=> array(0) { } ["count"]=> int(0) } 111string(0) "" int(1) int(10) int(70) int(8640000) string(13) "likecs_art_db" array(1) { ["query"]=> array(1) { ["match_all"]=> object(stdClass)#28 (0) { } } } array(1) { ["createtime.keyword"]=> array(1) { ["order"]=> string(4) "desc" } } int(10) int(0) int(8640000) array(2) { ["docs"]=> array(0) { } ["count"]=> int(0) } MySQL 优化Limit分页 - 爱码网

比较好的策略是使用 延迟关联: 通过使用覆盖索引查询返回需要的主键、再根据这些主键关联原表获得需要的行 

     假如有这样一个查询

select film_id,actor,description from film where actor='WaterBin' order by title limit 100000,5

   可以这样改造

select film.film_id,film.actor,film.description
  from film
inner join (
     select film_id from film where f.actor='WaterBin'
     order by title limit 100000,5 )
as f using(film_id);

相关文章: