Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timeout errors

Status
Not open for further replies.

mkey

Programmer
Oct 3, 2001
288
0
0
CA
Hi All,

We have an application that is front end uses VB code and back end uses sql server 7. Now when we run a simple query the execution time of that query is much fast on the connected server. However when an individual runs the same script on there local server which is on SQL Server 2000 the time it take to run a simple query is much longer. On the other hand when we run the exact query against the local server second time the script runs much faster. Do you have any idea why this is happening.
I hope I explained my problem clearly.

 
This question is to do with ADO mostly and SQL

1.Check your code for CONNECTION OBJECTS, have you CLOSED the recordset are you using CURSORS in your code, if not by default its static i would change this to FORWARD ONLY and lock to optimistic try this this should help



Rishi(MCSD,MCDBA,MCP)
 
Queries often run faster the 2nd time they are executed if the time time interval isn't too great. This occurs because SQL Server loaded the data pages from disk to mmcache (memory) during the first execution. The next execution can read apges directly from cache.

Other issues could cause the differences you see. A query running on a client PC may run longer because data must be transported over the network, When run on the server this network time factor doesn't exist.

Various settings, such as the net library, packet size, bandwidth, processor speed of the client vs the server, amount of available RAM, etc. can impact performance.

If you want to find the reason for the difference you'll need to do some serious monitoring. Check performance resources at...

Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top