25112
asked on
can lot of CASTs/Union or ISNULL possibly cause blocks?
This query runs fine every day scheduled.. but yesterday, it was blocked by itself in sysprocesses.. when I did select * from master..sysprocesses where blocked<>0 I saw 12 lines all for this one process running this, and all with same spid and same blocked column data.
is it because of excessive UNION/CAST etc. CAn you suggest?
is it because of excessive UNION/CAST etc. CAn you suggest?
What causes locks are long running queries. How long usually this query takes to run?
ASKER
right now it just ran in 3 seconds.. it has run scheduled for many months.. it was just yesterday that this has misbehaved (that we saw)..
what was puzzling was generally in sysprocesses, the blocked id is different than spid.. but here spid was same as blocked id and also several lines...
what was puzzling was generally in sysprocesses, the blocked id is different than spid.. but here spid was same as blocked id and also several lines...
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you. I will keep an eye on it.
Paul, appreciate your note.
do you have an mock tsql example to show how bad performance can deteriorate by adding a distinct?
Paul, appreciate your note.
do you have an mock tsql example to show how bad performance can deteriorate by adding a distinct?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
~~~~~~~~~~~~~~~~~~~~~~
Open in new window