April 6, 2011 at 3:15 am
I run a stored procedure from SSMS and it takes only 10ms to complete. The same procedure when called from an application times out after 2 minutes.
I am totally confused here. Any thoughts on what might be wrong and how to go about troubleshooting the issue ?
April 6, 2011 at 3:22 am
Sanz
Perhaps you are supplying different parameters, or maybe your connection settings are different (things like SET ANSI_NULLS). Different connection providers (ODBC, OLEDB and so on) have different default settings.
John
April 6, 2011 at 3:30 am
Checked those. The Procedure being executed by both methods(Management Studio and application) is the same. There is no difference in any of settings you mentioned.
April 6, 2011 at 3:42 am
Sanz (4/6/2011)
There is no difference in any of settings you mentioned.
Are you sure? SSMS has different defaults for some of the SET options than ADO.Net does. How did you check the set options?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 6, 2011 at 4:00 am
Does it always take this long for the application?
What data is being returned? Are there VARCHAR(MAX), TEXT or IMAGE fields?
April 6, 2011 at 6:17 am
Created non-clustered indexes on some columns as suggested by the execution plan and the result shows up quickly. Now there is no visible change even from the application.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply