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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For a table that size, use a Common-Table Expression (CTE) and ROW_NUMBER; use a small function to calculate the records to bring back based on
@PageNumberand@PageSizevariables (or whatever you want to call them). Simple example from one of our stored procedures: