Q
Problem solve Get help with specific problems with your technologies, process and projects.

Long delay when applications runs a query

A SQL Server query takes much longer to run when executed by an app rather than the client. Development expert Greg Low offers an answer.

A query gets executed within seconds when run from the SQL Server client. However, the very same query takes up to 50 seconds when my application executes it. The application uses an XA datasource and the query shows up as an RPC call in the SQL Profiler. What's up with that?
Whenever I see 40 or 50 second delays, it suggests name resolution problems on the network, particularly if this happens when the database hasn't been accessed for a few minutes. The default DNS resolution normally times out after about 40 seconds and then tries to resolve the name via broadcast. After that, it's cached for a little while and seems to work fine.
This was last published in December 2005

Dig Deeper on Microsoft SQL Server Performance Monitoring and Tuning

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

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

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close