Solved

Query Taking LONG time with DataAdapter.Fill

Posted on 2011-03-17
5
1,070 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
Comment Utility
remove the unnecessary dependencies before executing the query.
0
 
LVL 1

Expert Comment

by:bluedevil9
Comment Utility
let me know if the comment was helpful
0
 

Author Comment

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

Assisted Solution

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

Author Closing Comment

by:melegant99
Comment Utility
Great thanks, that did help.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Check if number is currency 15 27
Make a border less form movable 2 10
Mssql SQL query 14 24
Different Delete Messages 7 4
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

762 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

15 Experts available now in Live!

Get 1:1 Help Now