分页从数据库中获取数据的性能:存储过程与数据源 [英] performance of fetch data from database according to paging: stored procedure vs datasource

查看:83
本文介绍了分页从数据库中获取数据的性能:存储过程与数据源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据分页从数据库中获取数据的性能:存储过程与数据源

清单太长了.所以我做了分页.

哪个更快:

1)在DataSource对象上分页
2)在SP上分页
3)在ViewState上分页(第一次加载页面时已存储所有记录)

请回复.

Urgent

performance of fetch data from database according to paging: stored procedure vs datasource

List is soo long. So i did paging on it.

Which is more faster:

1) Paging on DataSource object
2) Paging on SP
3) paging on ViewState (stored all records while page is first time loading)

Please reply.

Urgent

推荐答案

告诉它的唯一方法是亲自尝试一下.这些方法中的每一种的每种实现都会给您带来利弊.由于我们不知道您的要求是什么,或者您的站点正在使用所有这些数据,或者这些实现的代码是什么样的,所以唯一的办法就是亲自尝试一下.
The only way to tell this is to try it for yourself. Every implementation of every one of these methods is going to give you pros and cons. Since we have no idea what your requirements are or what your site is doing with all this data or what your code looks like for these implementations or whatever, the only way to tell is to TRY IT FOR YOURSELF.


这篇关于分页从数据库中获取数据的性能:存储过程与数据源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆