有人可以建议如何查询数百万条记录以及如何在ASP .NET上管理它们吗? [英] Can somebody suggest how to query the millions of record and how to manage them on ASP .NET?

查看:74
本文介绍了有人可以建议如何查询数百万条记录以及如何在ASP .NET上管理它们吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每天都在每天,每年,每月查询数以千计的记录并在Asp .Net中显示报告,但是由于大量数据,我的页面查询速度越来越慢。



我在IIS上发布它需要几乎3GB的内存。





请指导我如何维护和查询大量数据。



我尝试过:



我在应用程序启动app.config中获取Application []中的所有数据然后在requery上它只更新新的行使它使我的页面快速但是由于Application []它在Server中占用了大量内存。

解决方案

如果您的旧数据没有更改,请尝试缓存查询结果并从缓存中读取或更好地缓存生成的报告。

您是否必须一次显示所有数据?而是使用时间频率参数创建存储过程,并在页面上有三个单选按钮,如每日,每月和每年。如果用户单击每日传递标记作为过程的参数并在过程内部,则查询仅读取所选频率的数据。



如果您默认为Daily添加页面,那就太好了。如果数据库上有更多数据可用,则修改存储过程以一次显示100条记录,并在报告中加入分页以加载后续页面。



- Karthick Raju


I have daily basis query to hundereds of thousands record and display reports in Asp .Net by daily, yearly, monthly, but by quering my pages get slower and slower due to huge amount of data.

it takes almost 3GB RAM when i published it on IIS.


please guide me how to maintain and query large amount of data.

What I have tried:

I get all data in Application[""] at application start app.config then on requery it only updates the rows which are new it makes my pages fast but because of Application[""] it takes alot of memory in Server.

解决方案

If your old data does not change, then try caching the results of the queries and read from the cache or better still, cache the resulting report.


Do you have to show all data at a time? Instead create stored procedures with parameters for Time frequency and have three radio buttons on page like Daily, Monthly and Yearly. If user clicks on Daily pass flag as parameter for the procedures and inside the procedure, query to read data only for the selected frequency.

It's good if you load page by default for Daily. If there is more data avail on the database then modify stored procedure to show 100 records at a time and have pagination in the report to load subsequent pages.

- Karthick Raju


这篇关于有人可以建议如何查询数百万条记录以及如何在ASP .NET上管理它们吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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