SqlDataAdapter.Fill超时,但基础查询立即运行。 [英] SqlDataAdapter.Fill times out, yet underlying query runs immediately.

查看:124
本文介绍了SqlDataAdapter.Fill超时,但基础查询立即运行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了SqlDataAdapter的问题。直到最近这个代码没有任何问题..它已运行多年。



有没有代码更改和次要数据库更改,但突然运行Fill已开始超时。我们查看了SQL生成并优化了一个我们认为是瓶颈的函数,并且它调用的sql语句运行速度非常快。



< p align = left>在Fill运行期间,我查看了锁并且看不到任何内容,所以我认为它没有被阻止,因此看起来瓶颈在于实际的SqlDataAdapter.Fill。



我在搜索中找到的这个问题的唯一其他参考是大量的列可能导致这个问题问题..这个数据集中有37个。但问题是代码在几年内没有改变,所以我们感到困惑的是它为什么突然停止工作。



有没有人任何想法可能导致这个?这是影响我们的代码下一次发布到生产中的关键问题!

解决方案

除此之外,我测试了相同的使用SqlDataReader的sql太快了......


I am having a problem with a SqlDataAdapter. Up until recently there were no problems whatsoever with this code.. it has been running for years.

 

There have been no code changes and minor database changes, yet suddenly running Fill has started to timeout. We looked at the SQL produced and optimised a function which we identified as a bottleneck, and the sql statement it calls runs blindingly fast.

 

During the running of the Fill, I look at the locks and can see none, so I don't think it is blocked on that, so it seems that the bottleneck is in the actual SqlDataAdapter.Fill.

 

The only other reference to this problem I found in a search is the fact that a large number of columns can cause this problem.. there are 37 in this dataset. The problem though is the fact that the code has not changed in years so we are baffled as why it should suddenly stop working.

 

Has anyone any ideas as to what might be causing this? This is a critical issue affecting the next release of our code into production!

解决方案

Further to this, I tested the same sql using a SqlDataReader and that too times out...


这篇关于SqlDataAdapter.Fill超时,但基础查询立即运行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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