?
Solved

Query Taking LONG time with DataAdapter.Fill

Posted on 2011-03-17
5
Medium Priority
?
1,237 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 1600 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 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

752 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