Solved

Query Taking LONG time with DataAdapter.Fill

Posted on 2011-03-17
5
1,186 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

Industry Leaders: 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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

718 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