November 18, 2002 at 9:54 am
Is there a way to speed up the deadlock detection? I'm seeing about a 5-10 second interval between the occurance of the deadlock, and the detection of it by the server. Although these happen rarely, I would like to have them resolved quicker. Also, if there is a way to improve the detection, what impact will that have on server performance?
-Dan
-Dan
November 18, 2002 at 10:57 am
I believe, not done it myself, that you can use SET LOCK_TIMEOUT. This will set how long to wiat for a lock before cancelling the query.
This will also affect situtations where you don't have a deadlock and the processes just need to wait for a lock to be released.
Deadlocks should be avoidable. They most often occur due to developers using COM+ not reading the data in the correct type class of class or at the wrong time. If you are encountering lots of deadlocks then you might be better of forcing the processes to get an update lock rather than a shared lock on read resources. This will then result in the second process (which woulkd have got into a deadlock) waiting for the resource to be freed and the continuing without any problem.
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply