Skip to main content
Improve GridView Performance by Delegating Paging to SQL Server
Entry Date: Rate:
Site:
Keywords:
RSS Description:
The ASP.NET GridView control is an extremely powerful tool that gives you just about everything you need to manage the sorting and paging of a web page grid with minimal coding effort. However, this power comes at a high price in terms of performance and scalability. As the number of rows in your data source increases, performance falls off dramatically and you waste serious server memory resources to render each page of grid rows.
Comments:

GridView by default implements paging and sorting, that it's ok if your queries just return a hundred of records... you can have serious performance issues if your query can return a big amout of records (everything is fetched on every post).

You can implement custom paging (object data source + SQL Server 2005 / 2008 new stuff), but is not something straight forward. This article explains you how to implement that step by step, even you can download a full sample project.