ADO.NET Query Timeout
-
Hey all, we've got a monster proc that does things like the following -- create tmp table -- for all fields in permanent table -- for all parties involved -- select somebig calculation -- update tmp table -- next party -- update permanent table w/ tmp value -- next field It takes a little over 3000 lines of TSQL to get the whole thing done. What really sucks is that I need to call this from a web page (*.aspx) and allow our client to view the results of this procedure. Eventually this will be a moot issue because it will run as a nightly job in Sql Server but while they test that it works I need to make sure that it runs smoothly from an aspx page. Here are my questions: 1. What is the maximum timeout I can apply to both the SqlCommand and SqlConnection objects? 2. Can I run this in a separate process and do a callback to the aspx page to display results? Airline websites tend to do this quite a bit when you're looking for a flight. I'm thinking of using an asynchronous delegate but I'd have to guess how long it would take before redirecting the user to the results... 3. Any ideas on how I can get this to run smoothly and not worry about timeouts? Thanks much, *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";
-
Hey all, we've got a monster proc that does things like the following -- create tmp table -- for all fields in permanent table -- for all parties involved -- select somebig calculation -- update tmp table -- next party -- update permanent table w/ tmp value -- next field It takes a little over 3000 lines of TSQL to get the whole thing done. What really sucks is that I need to call this from a web page (*.aspx) and allow our client to view the results of this procedure. Eventually this will be a moot issue because it will run as a nightly job in Sql Server but while they test that it works I need to make sure that it runs smoothly from an aspx page. Here are my questions: 1. What is the maximum timeout I can apply to both the SqlCommand and SqlConnection objects? 2. Can I run this in a separate process and do a callback to the aspx page to display results? Airline websites tend to do this quite a bit when you're looking for a flight. I'm thinking of using an asynchronous delegate but I'd have to guess how long it would take before redirecting the user to the results... 3. Any ideas on how I can get this to run smoothly and not worry about timeouts? Thanks much, *->>Always working on my game, teach me *->>something new. cout << "dav1d\n";
I know this is not what you have asked but: Have you tried removing the need for a cursor? Cursors are "very" rarely needed. It has been my experience that changing cursors to properly indexed set operations removes any significant time-out issues.