Better paging performance

Posts   
 
    
takb
User
Posts: 150
Joined: 12-Mar-2004
# Posted on: 27-Apr-2006 01:53:18   

Not sure if you've seen this before, but here is an article describing a technique that SIGNIFICANTLY improves paging performance (see the performance comparison table at the bottom of the article). http://www.4guysfromrolla.com/webtech/042606-1.shtml

Referenced from this blog entry: http://scottonwriting.net/sowblog/posts/5992.aspx

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 27-Apr-2006 08:04:01   

Thanks for the nice article.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 27-Apr-2006 10:22:31   

THe rowcount trick doesn't work in a lot of situations, hence the reason it's not used in the runtime. I've tried every trick there is and the temptable was the only one which was reliable.

The temptable approach is actually pretty fast, though it depends on how you've setup the tempdb in sqlserver. Some people keep the tempdb very small, which causes re-sizing at runtime and thus slow queries.

In v2, you can switch to CTE paging on sqlserver 2005, which is the fastest way of doing paging on sqlserver.

Frans Bouma | Lead developer LLBLGen Pro