• SwePeso (12/6/2010)


    It seems the dual TOP/ORDER BY was the most efficient approach by the time.

    I tested the new Denali OFFSET/FETCH and I got the exact same number of reads for @StartRow = 5000, but 2 ms instead of 4 ms.

    SELECTNumber

    FROMdbo.TallyNumbers

    ORDER BYNumber

    OFFSET@StartRow - 1 ROWS

    FETCH NEXT50 ROWS ONLY

    My take on the Denali paging....

    http://sqlblogcasts.com/blogs/sqlandthelike/archive/2010/11/10/denali-paging-is-it-win-win.aspx

    and

    http://sqlblogcasts.com/blogs/sqlandthelike/archive/2010/11/19/denali-paging-key-seek-lookups.aspx



    Clear Sky SQL
    My Blog[/url]