Over a million developers have joined DZone.

Efficient Paging in SQL Server 2005

· Database Zone

Learn NoSQL for free with hands-on sample code, example queries, tutorials, and more.  Brought to you in partnership with Couchbase.

It is a little bit off topic for my blog, but I came across a situation today while at work where I needed to page the results of a stored proc, but at the same time I needed to make sure that the database wasn't looking through so many rows that it would cause a slowdown. The solution that I came up with is not exactly the most novel solution that exists, but it certainly did the job. And from the testing I did, it is pretty efficient. I also realized how many new features in SQL Server 2005 it used (so old school), and so, I figured I'd throw it up here hoping that it might help someone. Also, hopefully someone will point out something that could be done better.

Read this rest of this post at CodeThinked.com

The Getting Started with NoSQL Guide will get you hands-on with NoSQL in minutes with no coding needed. Brought to you in partnership with Couchbase.

Topics:

Published at DZone with permission of Justin Etheredge. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}