Solved

Query Taking LONG time with DataAdapter.Fill

Posted on 2011-03-17
5
1,095 Views
Last Modified: 2012-05-11
I have a SPROC, nothing to crazy...few sums and 2 joins.

In query analyzer, it takes .0 seconds to run. From code, right on DataAdapter.Fill(myTable). 20 seconds or times out.

Not sure what to do from here aside from the obvious which I have checked (indexes, etc).

Thanks for help.
0
Comment
Question by:melegant99
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
bluedevil9 earned 400 total points
ID: 35155789
remove the unnecessary dependencies before executing the query.
0
 
LVL 1

Expert Comment

by:bluedevil9
ID: 35155804
let me know if the comment was helpful
0
 

Author Comment

by:melegant99
ID: 35155865
How can i check what is an 'unnecessary ' dependency?
0
 
LVL 4

Assisted Solution

by:qasim_md
qasim_md earned 100 total points
ID: 35155879
Put select ... from table1 (nolock) in your queries and try...
0
 

Author Closing Comment

by:melegant99
ID: 35156043
Great thanks, that did help.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now