ASP.NET实现分页功能

本文探讨了数据库分页的两种主要实现方式:数据库级别分页和应用级别分页。数据库级别分页直接在数据库中限制返回结果的数量,而应用级别分页则是在应用层从完整数据集中提取所需页面,后者在处理大量数据集时可能导致性能问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

There are two main ways to implement paging:

• Paging at the database level: In this case, the database returns only the page of products
the visitor wants to see.
• Paging at the application level: In this scenario, the data tier always returns the complete
list of products for a certain section of the site, and the presentation tier objects (such as
the GridView control) extract the requested page of products from the complete list. This
method has potential performance problems especially when dealing with large result
sets, because it transfers unnecessarily large quantities of data from the database to the
presentation tier. Additional data also needs to be stored on the server’s memory, unneces-
sarily consuming server resources.

 

Not original,copied from, :Beginning ASP.NET E-Commerce in C# From Novice to Professional.

转载于:https://www.cnblogs.com/elock/archive/2009/12/05/1617709.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值