两次分页查询,其中跳过了2个id
select * from jdp_tb_trade where jdp_modified>='2017-04-24 20:22:01' and jdp_modified<='2017-04-24 20:23:05' order by jdp_modified asc limit 215,5;
select * from jdp_tb_trade where jdp_modified>='2017-04-24 20:22:01' and jdp_modified<='2017-04-24 20:23:05' order by jdp_modified asc limit 220,5;
最后发现是因为order by:jdp_modified
而分页的数据jdp_modified都是相同的,导致了没有第二个排序的依据,导致顺序错乱
最后解决的办法是 order by jdp_modified,id ,在相同的情况下通过id进行排序,不会重复也不会变化