没有做任何基准自己,所以想得到专家的意见.
看了一些关于row_number()的文章,但似乎有性能影响
什么是其他选择/替代品?
WITH result_set AS ( SELECT ROW_NUMBER() OVER (ORDER BY <ordering>) AS [row_number],x,y,z FROM table WHERE <search-clauses> ) SELECT * FROM result_set WHERE [row_number] BETWEEN a AND b
对于具有>的表,我们可以正常工作1,000行.