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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query runs faster in query analyser, but application is very slow

Status
Not open for further replies.

balachandar

Programmer
Apr 16, 2001
88
CA
Hi,
We are constructing a vb application where in we use dsn less connection and rdo_One query which is taking nearly 20-30 seconds in the query analyser is taking long time to run in the application. the application is some times hanging.Is it because of the dsn less connection we are using? we have sql server as the back end. Please help me
regards
balachandar.g
 

Slow performance may be caused by a number of factors. Can you post your VB code for making the connection and returning records? This should include the SQL statement for the query. Also post the structure of the SQL table(s) involved, including indexes. It would be helpful to know the column data types (int, char, etc.) and the index types (clustered, non-clustered, unique).

Thanks, Terry
------------------------------------
Blessed is the man who, having nothing to say, abstains from giving us worthy evidence of the fact. -George Eliot
 
In situations like this, I've found that running SQL Server Profiler to be invaluable (I'm working in Sybase right now, and boy do I miss my Profiler!).

If you have a lot of activity on your server, add an "APP=" clause to your connection string so that you can easily pick out the subject application from among the others that may appear.

Running Profiler (or, if you get desparate, ODBC Trace) can help you identify if there are other unforeseen processes being invoked by the app that aren't by running the single query in QA. Robert Bradley
Sr. DBA, some big company
cheap prints and oil paintings:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top