Solved

Query Taking LONG time with DataAdapter.Fill

Posted on 2011-03-17
5
1,153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

749 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