How can I determine what resources my query is waiting for?
If the query is waiting on memory how can I determine this?
We have several queries in a batch job we are trying to
determine why the query is waiting so long to complete.
Thanks
Mark
FROM BOL:
A transaction containing the waiting query may hold locks
while the query waits for memory. In rare situations, it
is possible for an undetectable deadlock to occur.
Decreasing the query wait time lowers the probability of
such deadlocks. Eventually, a waiting query will be
terminated and the transaction locks released. However,
increasing the maximum wait time may increase the amount
of time for the query to be terminated. Changes to this
option are not recommended.
There are a numbe rof columns in master..sysprocesses that help you look at
WAITTYPE info for a process. You should also take a look at dbcc
sqlperf(waitstats).
Tom Davidson, from MS, has written a nice article on this at SQLMag.com
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Mark" <anonymous@.discussions.microsoft.com> wrote in message
news:2b3fe01c46820$14c51900$a401280a@.phx.gbl...
> How can I determine what resources my query is waiting for?
> If the query is waiting on memory how can I determine this?
> We have several queries in a batch job we are trying to
> determine why the query is waiting so long to complete.
> Thanks
> Mark
>
> FROM BOL:
> A transaction containing the waiting query may hold locks
> while the query waits for memory. In rare situations, it
> is possible for an undetectable deadlock to occur.
> Decreasing the query wait time lowers the probability of
> such deadlocks. Eventually, a waiting query will be
> terminated and the transaction locks released. However,
> increasing the maximum wait time may increase the amount
> of time for the query to be terminated. Changes to this
> option are not recommended.
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment