ASP.NET Grid视图,保存数据需要花费大量时间并收到服务器错误消息 [英] ASP.NET Grid view ,to save the data it is taking lot of time and getting server error message

查看:70
本文介绍了ASP.NET Grid视图,保存数据需要花费大量时间并收到服务器错误消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在我的解决方案中,我只有一个aspx页面,因为我只有一个网格视图。但是当用户执行页面时,记录正在加载来自数据库超过50000 ...



在另外一项功能中,我们可以添加记录(仅限用户名)。



当用户尝试添加新用户时,它会抛出服务器错误消息,因为它需要花费大量时间来执行。还有一件事是网格中没有分页。



请指教.........



谢谢,

Codehub。

解决方案

这些记录肯定会花费超过一秒的时间来加载。



不要这样做。加载较少的数据。还记得按需加载吗?



在显示数据时使用分页/过滤。



在数据库中。

SQL Server 2005分页结果 [ ^ ]



在前端

GridView多重过滤器AJAX控件 [ ^ ]

重复分页和分页功能 [ ^ ]



查看本系列的数据库优化

< a href =http://www.codeproject.com/KB/database/Opt imizeDBUseIndexing.aspx>优化SQL Server中数据访问的十大步骤:第一部分(使用索引) [ ^ ]

在SQL Server中优化数据访问的十大步骤:第二部分(重新考虑TSQL并应用最佳实践) [ ^ ]

优化SQL Server中数据访问的十大步骤:第III部分(应用高级索引和非规范化) [ ^ ]

返回顶部在SQL Server中优化数据访问的10个步骤:第IV部分(诊断数据库pe性能问题) [ ^ ]

在SQL Server中优化数据访问的十大步骤:第五部分(优化数据库文件并应用分区) [ ^ ]

Hi All,
In my solution i have only one aspx page,in that i have only one grid view.But when user executed the page the records are loading from data base more than 50000...

In that one more functionality that is we can add the records(only user name).

When user trying to add the new users it is throwing server error message because it is taking lot of time for execution. One more thing there is no paging in the grid.

Please advise.........

Thanks,
Codehub.

解决方案

That much records surely'd take more than bunch of seconds to load.

Don't do that way. Load less data. Remember "Load on demand"?

Use paging/filtering while displaying the data.

In database side
SQL Server 2005 Paging Results[^]

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

Check this series for database optimization
Top 10 steps to optimize data access in SQL Server: Part I (use indexing)[^]
Top 10 steps to optimize data access in SQL Server: Part II (Re-factor TSQL and apply best practices)[^]
Top 10 steps to optimize data access in SQL Server: Part III (Apply advanced indexing and denormalization)[^]
Top 10 steps to optimize data access in SQL Server: Part IV (Diagnose database performance problems)[^]
Top 10 steps to optimize data access in SQL Server: Part V (Optimize database files and apply partitioning)[^]


这篇关于ASP.NET Grid视图,保存数据需要花费大量时间并收到服务器错误消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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