Anatoly Lubarsky Logo
MSSQL, .NET, Design. Life and Music

MSSQL 2005: Paging with ROW_NUMBER is the fastest

Speaking about Paging in MSSQL - obviously Paging with ROW_NUMBER is the fastest paging for today. I just made some tests comparing it to Paging with ROWCOUNT and ROW_NUMBER is much faster. Tested on million rows. ROWCOUNT is also fast, the main query cost there goes for COUNT(*) but still. Also both ways do not depend on the page number - first and last pages have the same cost.


Related Posts:

Friday, March 24, 2006 10:23 PM

If your feedback doesn't appear right away, please be patient as it may take a few minutes to publish.

Post a Comment

Protected by CAPTCHAEnter the code you see
Name (*)  
E-mail (*)  
Url
Remember

Comment (*)