Monday, March 26, 2012

Query will not stop running

I have a query that suddenly will not resolve at all.
Whereas it used to run in < 10 seconds, now it will
continue running until it is cancelled with no results.
I used sql profiler on the query, and I let the query
run for 7 minutes, and while I got no results,
the query perfomed 112 million reads!
I have already dropped and recreated the stored procedure,
and I've cleared the procedure cache to no avail.
Any ideas?
Hi
Indexes? Check that the indexes are still there, re-build them.
Make sure that the query has not changed. An outer join would do something
like this. Even removing a join statement.
Regards
Mike
"Berry" wrote:

> I have a query that suddenly will not resolve at all.
> Whereas it used to run in < 10 seconds, now it will
> continue running until it is cancelled with no results.
> I used sql profiler on the query, and I let the query
> run for 7 minutes, and while I got no results,
> the query perfomed 112 million reads!
> I have already dropped and recreated the stored procedure,
> and I've cleared the procedure cache to no avail.
> Any ideas?
|||In news:42E0E3F8-B79C-4DDC-9ED7-F3AAFC8A9BF7@.microsoft.com,
Berry <Berry@.discussions.microsoft.com> said:
> I have a query that suddenly will not resolve at all.
> Whereas it used to run in < 10 seconds, now it will
> continue running until it is cancelled with no results.
> I used sql profiler on the query, and I let the query
> run for 7 minutes, and while I got no results,
> the query perfomed 112 million reads!
> I have already dropped and recreated the stored procedure,
> and I've cleared the procedure cache to no avail.
> Any ideas?
You start off by saying it's a query and finish with it as a stored
procedure. Assuming you mean the latter, do you have an loops that may not
ever reach their termination condition?
Steve
|||Berry wrote:

>I have a query that suddenly will not resolve at all.
>Whereas it used to run in < 10 seconds, now it will
>continue running until it is cancelled with no results.
>I used sql profiler on the query, and I let the query
>run for 7 minutes, and while I got no results,
>the query perfomed 112 million reads!
>I have already dropped and recreated the stored procedure,
>and I've cleared the procedure cache to no avail.
>Any ideas?
>
No, not without seeing some details. Can you possibly
post the query or stored procedure, as well as the CREATE TABLE
and CREATE INDEX statements for the tables it accesses? Here's
a guide that explains how to do that:
http://www.aspfaq.com/etiquette.asp?id=5006
Steve Kass
Drew University
|||Thanks for everyone's help, but my now-fixed issue was caused by indexes ,
or, i should say, the LACK of indexes.
"Steve" <steve@.somewhere.invalid.com> wrote in message
news:46rMd.974044$f47.166864@.news.easynews.com...
> In news:42E0E3F8-B79C-4DDC-9ED7-F3AAFC8A9BF7@.microsoft.com,
> Berry <Berry@.discussions.microsoft.com> said:
> You start off by saying it's a query and finish with it as a stored
> procedure. Assuming you mean the latter, do you have an loops that may
not
> ever reach their termination condition?
> --
> Steve
>

No comments:

Post a Comment