教你50招提升ASP.NET性能(五):确保分页是在数据层完成的

(11)Make sure paging is conducted at the database layer

招数11:

确保分页是在数据层完成的

When using grid UI controls (framework based, or 3rd party owned), you should carefully consider how paging is implemented. Many controls implement paging in a simplistic fashion, where the database is required to return all available data and the control limits what is shown. This strategy is fraught with performance problems, as it means that all the data in the given set must be extracted from the database (e.g. all customers or orders). Depending on the records involved, this could cause significant problems.
使用Grid UI控件(基于框架,或者三方拥有)的时候,你应该认真考虑分页是如何实现的。许多控件用简单时尚的方式实现分页,数据库需要返回所有可用的可视范围内的数据。这种策略充满了性能问题,因为它意味着所有当前设置的数据必须从数据库获取(例如:所有的客户或者订单)。根据相关记录,这会引起严重的问题。

转载于:https://www.cnblogs.com/JavCof/p/3177743.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值