Reputation: 16077
I know several ways of writing paged query in SQL Server 2005. But I have no idea about their performance. Which one is the best and most optimized way for writing paging SQL queries?
Upvotes: 1
Views: 250
Reputation: 35476
In my experience it's using ROW_NUMBER(), just make sure the orderby field is the clustered index so you won't have to pay penalties for sorting the dataset on each query.
Upvotes: 3