Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have used lot of paging code in SQL Server 2008. The format is

With CTE(
 -- SQL With RowNumber


This is working fine. But I have heard that SQL Server 2012 has better paging support. So, if I change all my stored procedures with paging to the new method, will my queries be more efficient?

share|improve this question
up vote 2 down vote accepted

Actually, the OFFSET/FETCH extension is more syntactic sugar than performance enhancement. I've heard of a few cases where performance can be improved, but in all of my tests thus far, the performance is equivalent to the CTE with ROW_NUMBER() that you're already using - or at least not "better enough" to justify a code change. IMHO. You'll want to actually test your queries in your environment against your data to see if the performance benefit is worth the refactor.

Some very early performance comparisons here:

And the documentation:

share|improve this answer
Thanks Aaron. I think I need to test my self – user960567 Apr 24 '13 at 13:43
@user960567 yes, that is the best answer. I may be totally wrong on my conclusions for your specific case, but no matter what I observe, it would be wrong to tell you that is universal fact. – Aaron Bertrand Apr 24 '13 at 13:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.