Asp.net中的数据提取 [英] Data Fetch in Asp.net

查看:105
本文介绍了Asp.net中的数据提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用asp.net从数据库中获取数据,但是问题是DB表包含了超过100,000行的数据.我的UI在获取数据时运行缓慢,并且花费大量时间.

请建议更快地进行获取.

Hello All,

I am fetching data from database using asp.net , but problem is that DB table contains more then 100,000 rows of data. My UI runs slowly when it fetchs the data , and it takes a lot lot time .

Please suggest for faster fetching.

推荐答案

用户永远都不想一次看到100,000行数据.您正在使用的控件可以在虚拟模式中使用.这样,您将只获取在一个屏幕上可见的数据,理想情况下,获取的数据要多3倍左右.如果用户想查看上一页/下一页,则可能是缓存命中,因此结果几乎会立即呈现.在最坏的情况下,用户希望滚动到很远的地方.这将是整个缓存未命中,但是重新获取完整数据不会花费太长时间,因为这只是另外3个以上的数据屏幕.您可以设计更复杂的缓存机制,但是想法几乎相同, http://en.wikipedia.org/wiki/缓存 [ ^ ].

—SA
The user never wants to see 100,000 rows of data at a time. The control you''re using can be used in a virtual mode. In this way, you will fetch only the data which could be visible on one screen, ideally, 3 or so times more. If a user wants to look at previous/next page, it will be a situation of cache hit, so the result will be rendered almost immediately. In worst cases, the user wants to scroll far away; and it will be a total cache miss, but re-fetching of full data will not take too long time as this is just another 3+ screens of data. You can devise more sophisticated caching mechanism, but the idea will be pretty much the same, http://en.wikipedia.org/wiki/Cache[^].

—SA


一个可怕的人,一次加载了100,000行.只要考虑一下最终用户,他们就不会喜欢那么多的延迟或什么.

只需使用分页,即可过滤数据.

在数据库端
SQL Server 2005分页结果 [ GridView多个过滤器AJAX控件 [具有分页和排序功能的中继器 [
It''s horrible man that loading 100,000 rows at a time. Just think about the end user, they never like that much delay or something.

Just use paging, filtering in data.

In database side
SQL Server 2005 Paging Results[^]

In your controls
GridView Multiple Filter AJAX Control[^]
Repeater with Paging and Sorting Features[^]


这篇关于Asp.net中的数据提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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