Geeks With Blogs
Scott Kuhl Warning: I may have no idea what I am talking about!

It is amazing the amount of cycles, hardware and brain ware, go into paging results efficiently. Recently Scott Mitchell authored an article titled Efficiently Paging Through Large Result Sets in SQL Server 2000 that looked at a stored procedure that returned a particular "page" of data from a table. After examining Scott's approach, I saw some potential improvements in his method.

In this article we'll look at two ways to improve Scott's method. The first approach uses a table variable (just like Scott's), but utilizes the SET ROWCOUNT command to reduce the number of records read and inserted into the table variable. The second technique more cleverly uses SET ROWCOUNT to provide an even more efficient approach than the first.

The results are worth the read.

Read A More Efficient Method for Paging Through Large Result Sets

Posted on Wednesday, April 26, 2006 11:08 AM SQL Server | Back to top


Comments on this post: A More Efficient Method for Paging Through Large Result Sets

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Scott Kuhl | Powered by: GeeksWithBlogs.net