I have an update query which runs every hour. When it runs it freezes the system and nobody can work. How to fix this issue
update SL
set TrsID=U.TrsID
from ST (nolock) as T
join SL as P on T.TrsID=P.TrsID
join ST (nolock) as U on U.TrsUnionID=T.TrsUnionID
and U.LotID=T.LotID and U.TrsID<>T.TrsID
where T.TrsID>195171640
and U.TrsTypeDesc2=' (PENDING)'
I used (nolock) still it freezes. What to do
As per microsoft 'No lock' is deprecated ,so you can't expect the desired result using that keyword .Read more on the topic in these links Link1 and Link2.
If your problem is because of the resource blocking ,then use transaction with appropriate Isolation Level.