Question

  Asked: May 21 2008   6:24 AM GMT
  Asked by: Abcp


Execution time is varying with query analyzer and visual studio 2005


Visual Studio, SQL Query Analyzer, SQL, Stored procedures, SQL Server stored procedure

when a stored procedure is executed in query analyzer its working fine and getting the result quickly.but when same procedure is executed through visual studio timeout expired error is generated.can any one olve this issue

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



I don't know that this will solve the issue, as much as it will be a list of items to check. Possibly others can add more information.

Compare the SQL Driver being used in the code with the type you've selected in query analyzer and make sure it is the fastest driver available. (For example, if it's a Oracle server you might actually want to use the Oricle driver rather than the standard Microsoft Oracle Driver since it is likely faster.

Check the code to ensure it is not doing something repetively (no matter how small) before, during, or after execution of the Stored Procedure.

Check for other processes running in SQL that are coincidently running when you run the code from visual studio.

Check for Locking conditions where one SQL call is actually blocking a table because of one call being made. This was very apparent in 2000 and before. Query analyzer would actually open teh whole table Read/Write if a select * was issued--- and block other queries from occuring. (Bit me more than once with developers squaking about execution times on queries and another developer would have the table open in enterprise manager viewing data.)
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Development, SQL Server and Database.

Looking for relevant Development Whitepapers? Visit the SearchWinDevelopment.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register