Effective Data Paging Using SQL Server 2005 and Microsoft's Enterprise Library | Database Journal

Effective Data Paging Using SQL Server 2005 and Microsoft’s Enterprise Library

Jun 10, 2005
1 minute read

[From ASP101]

Displaying records from a table in a tabular way became very easy in ASP.NET. All you have to do is set a DataSource property on a DataGrid component to a DataSet containing records (or any object implementing the IList or IListSource interface). If the number of records in your data source is greater than the size of your screen, you can page through your records using the paging mechanism built in to the DataGrid. In most cases, this is a convenient and easy solution, but as your website becomes mature and the database accumulates more data you will probably notice a considerable amount of delay while paging the grid. Don’t worry, your web server is still fine and so is your database server. The problem relies on the fact that your data grid pulls out all the records in your data source and then divides it into pages. In essence, you cache all the records in your table every time the page is loaded regardless of what you see on the screen. Try paging through one million records and you will probably need to wait about five minutes between page refreshes. That is assuming your web server can actually cache the data and will not run out of memory.

The article continues at http://www.asp101.com/articles/gal/effectivepaging/default.asp

Database Journal Logo

DatabaseJournal.com publishes relevant, up-to-date and pragmatic articles on the use of database hardware and management tools and serves as a forum for professional knowledge about proprietary, open source and cloud-based databases--foundational technology for all IT systems. We publish insightful articles about new products, best practices and trends; readers help each other out on various database questions and problems. Database management systems (DBMS) and database security processes are also key areas of focus at DatabaseJournal.com.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.