最佳sql server 分页查询

用关键字查询 并作为条件是最快的,比其他嵌套select性能都要好

select top 100 id , name from tablex where id >preid order by id

preid是上次查询的结果的最大值

这样的好处是查询速度是最快的,超过任何嵌套select

缺点是只能挨个查,不能跳页查

posted @ 2018-06-05 20:41  lost in java  阅读(269)  评论(0编辑  收藏  举报