Execution time is varying with query analyzer and visual studio 2005

5 pts.
Tags:
Microsoft Visual Studio
SQL
SQL Query
SQL Server stored procedures
Stored Procedures
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

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.)

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following