带有sql server的asp.net中的数据加载问题 [英] Data load issue in asp.net with sql server

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

问题描述

你好,



我面临asp.net SqlDataReader 的问题。



当我在sql server 2008中执行存储过程然后它在1秒内给出响应但同样的存储过程

在asp.net中执行 SqlDataReader 然后需要1分钟....



和是的数据不多,我显示1列,近200行



这有可能吗?为什么asp.net需要更多时间来执行SP?



请帮助我...

解决方案

1. SP由SQL服务器而不是ASP.NET执行,SQL服务器上的执行时间相同;



2.延迟问题是生成者:

i)从数据库读取的数据量,b / b)通过互联网从Web服务器到浏览器的数据传输结果。 $>


3.解决方案是使用分页。您可以在我的下一篇文章中找到详细信息和源代码(包括SP的分页):高级ASPX GridView分页和数据实体 [ ^ ]


我发现在asp.net中需要花费更多数据加载时间的问题

因为我的数据库和我的代码都在不同的服务器上。

因此需要更多时间来获取数据。

现在我把它放在同一台服务器上,我快速获得数据。

Hello,

I facing issue with asp.net SqlDataReader.

when i execute store procedure in sql server 2008 then it gives response within 1 second but same store procedure
execute in asp.net with SqlDataReader then it take 1 minute....

and yeah data not more, I display 1 column and near about 200 rows

How it possible this? why asp.net take more time to execute SP?

please help me...

解决方案

1.The SP is executed by the SQL server and not by ASP.NET and the execution time is the same on the SQL server;

2.The delay problem is generated by:
i)the amount of data read from the database,
ii)the data transfer of the results over the internet from the web server to the browser.

3.The solution is to use pagination. You could find details and source code (including SP for pagination) in my next article: Advanced ASPX GridView Pagination and Data Entities[^]


I found one issue for take more data load time in asp.net
because my database and my code both are on different server.
so it take more time for fetching data.
now I putted on same server and I getting data speedy.


这篇关于带有sql server的asp.net中的数据加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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