最佳sql server 分页查询

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

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

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

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

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

猜你喜欢

转载自www.cnblogs.com/caihemm/p/9141772.html