Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Transactions: good or bad?

Re: Transactions: good or bad?

From: Todd Bandrowsky <anakin_at_unitedsoftworks.com>
Date: 19 May 2003 05:28:09 -0700
Message-ID: <af3d9224.0305190428.5654175e@posting.google.com>


> > Is deadlock a system failure?

Writing a single var atomically is not enough. If you try to write 100 values atomically, like, you have a super update statement, you will still have deadlocks because all 100 rows will have to have read and write isolation internally.

If you have, in your model, two competing UPDATE statements, and, there is an intersection of the rows they are updating, then, you can still have a deadlock.

The problem of deadlocks cannot be solved by assuming an atomic assignment of multiple values of once - atomic assignment of multiple values is exactly what a transaction is, and that causes deadlocks.

So, you have to have deadlock detection scheme in your code anyway. It seems silly to have the users of your system use TWO deadlock detection schemes, the one you propose and the one you have to have.

Of course, you can serialize based on TABLE - or do TABLE level locking, in otherwords, and that could make your atomic assignment work. But, congratulations, you've just rewritten MYSQL. Received on Mon May 19 2003 - 07:28:09 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US