What is the most efficient paging solution using SQL Server 2005 against a table with around 5,000-10,000 rows? I\'ve seen several out there but nothing comparing them.
SELECT * FROM
(
SELECT Row_Number() OVER(order by USER_ID) As RowID,
COUNT (USER_ID) OVER (PARTITION BY null) AS TOTAL_ROWS,
select name from usertbl
)
As RowResults WHERE
RowID Between 0 AND 25