Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

I posted two articles on doing efficient data paging with ASP.NET 2.0 and SQL 2005 earlier this year:

Scott Mitchell just posted two great articles discussing custom paging and the ObjectDataSource control even further, and includes SQL profile data and traces to quantify the performance gains you can realize from it.  You can read them here:

Definitely worth checking out!

Hope this helps,

Scott

 

Published Wednesday, March 22, 2006 10:41 PM by ScottGu
Filed under: , ,

Comments

# re: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

Thursday, March 23, 2006 3:19 AM by Manuel Abadia
Good catchs but as most of the examples out there he's using a DataSet instead of custom objects.

I posted about ObjectDataSource with custom paging and sorting here:

http://www.manuelabadia.com/blog/PermaLink,guid,f002752d-1258-475d-9ec0-eee3bd98d0a4.aspx

And continued here:

http://www.manuelabadia.com/blog/PermaLink,guid,eaa3eed8-f997-43c4-8c30-78c2f72d0c86.aspx

I hope the bug I pointed in the last part will be fixed soon.

Manu.

# re: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

Thursday, March 23, 2006 4:08 AM by Steve
Thanks! I wish I could use these techniques but our customers probably won't have 2005 for a few more years. Does anyone have a pointer to a best practices for SQL 2000?

Basically, wondering if "TOP(PageSize) ASC of TOP(PageNum*PageSize) DESC" is the best way to do things. Also, I'm curious why they can't just provide a row range operation. Seems we'll never be able to avoid having to write one sproc per orderby.... :(

# re: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

Friday, March 24, 2006 8:38 AM by liggett78
Look at http://www.codeproject.com/aspnet/PagingLarge.asp. I implemented some of these, works great even with million rows

# Using LINQ with ASP.NET (Part 1)

Monday, May 22, 2006 3:22 AM by ScottGu's Blog
One of the new things I’m super excited about right now is the LINQ family of technologies that are starting...

# re: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

Monday, May 29, 2006 1:07 PM by FAHAD
I am Still confuze....

i want simple DataList Sorting and paging with AJAX and DATASET.. NOT ObjectDataSource / DAL

Plzz Reply

Regards

fahadtheking@gmail.com

# re: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

Tuesday, August 01, 2006 5:48 AM by bluedee
how to implement it using sql server 2000? thanks

# Another Approach to Custom Paging: C# and SQL 2005 using Optional Parameters and ROW_NUMBER()

Wednesday, September 20, 2006 5:06 PM by .net_2.0

There are alot of features with .Net 2.0 that allow for binding to data sources, and not writinga single...

# re: Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005

Tuesday, January 09, 2007 10:35 AM by Matt

liggett78, thanks for the link to that excellent article!  I'm finally able to efficiently sort my cutom-paged million-record table with SQL Server 2000. I decided to abandon the Rowcount method in favor of the slightly slower Cursor method mentioned in that article, which allows sorting on columns that aren't unique.

# High Performance DataBinding for ASP.NET - A True Story

Wednesday, September 12, 2007 12:51 PM by Tony Lombardo

Performance Through Custom Paging These days, just about every ASP.NET application has a grid of some

# High Performance DataBinding for ASP.NET - A True Story

Wednesday, September 12, 2007 12:51 PM by /dev/null [tony lombardo]

Performance Through Custom Paging These days, just about every ASP.NET application has a grid of some