Query Taking LONG time with DataAdapter.Fill

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.
melegant99Asked:
Who is Participating?
 
bluedevil9Connect With a Mentor Commented:
remove the unnecessary dependencies before executing the query.
0
 
bluedevil9Commented:
let me know if the comment was helpful
0
 
melegant99Author Commented:
How can i check what is an 'unnecessary ' dependency?
0
 
qasim_mdConnect With a Mentor Commented:
Put select ... from table1 (nolock) in your queries and try...
0
 
melegant99Author Commented:
Great thanks, that did help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.