Re: unexpected deadlocks
From: Tom Moreau (tom_at_dont.spam.me.cips.ca)
Date: 02/15/05
- Next message: Mangesh Deshpande: "restore question"
- Previous message: pdxJaxon: "Re: RAID 10 vs. RAID 5 question"
- In reply to: Henk Kok: "Re: unexpected deadlocks"
- Next in thread: Henk Kok: "Re: unexpected deadlocks"
- Reply: Henk Kok: "Re: unexpected deadlocks"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 15 Feb 2005 18:04:24 -0500
The second alternative requires more reading, even if it is using an index.
That said, is there a compelling business reason to have no gaps in the
generated sequence number? Right now, you're serializing things, which will
hurt scalability.
-- Tom ---------------------------------------------------- Thomas A. Moreau, BSc, PhD, MCSE, MCDBA SQL Server MVP Columnist, SQL Server Professional Toronto, ON Canada www.pinnaclepublishing.com . "Henk Kok" <henk@mira_uknowwhat2do_beau.nl> wrote in message news:4212153b$0$28980$e4fe514c@news.xs4all.nl... Hi Tom, I'm not sure what you had in mind, but I can now answer the question "why are the deadlocks not surprising" myself. The application runs under COM+ and COM+ transactions, which force the Sql Server transaction isolation level to serializable. See also: http://vyaskn.tripod.com/com_isolation_level.htm This explains the deadlocks. I've changed the procedure using your suggestion. I've created 2 alternate solutions: 1. still use the [System] table in the way that Tom described; both the update/assign and the insert in 1 transaction 2. instead of using the [System] table I use "select max(MutatieID) + 1 from messages with (UPDLOCK)" which will use an optimized index search I'm a bit worried about locking the index in the second altenative, but we'll test both. Any thoughts on this remain very welcome. Henk Kok
- Next message: Mangesh Deshpande: "restore question"
- Previous message: pdxJaxon: "Re: RAID 10 vs. RAID 5 question"
- In reply to: Henk Kok: "Re: unexpected deadlocks"
- Next in thread: Henk Kok: "Re: unexpected deadlocks"
- Reply: Henk Kok: "Re: unexpected deadlocks"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|