Re: Strange thing

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 13 Jun 2012 23:14:57 +0100
Message-ID: <RtWdnRXqOPpOjUTSnZ2dnUVZ7sSdnZ2d_at_bt.com>


"Mladen Gogala" <gogala.mladen_at_gmail.com> wrote in message news:jradqs$f50$1_at_solani.org...
| On Tue, 12 Jun 2012 21:55:35 +0100, Jonathan Lewis wrote:
|
| Jonathan, I don't want to play around, I was just wandering how did
| Oracle release the locks before the transaction had committed. I believe
| you gave me an answer: it didn't release them, it converted them to NULL
| mode. The practical effect is pretty much the same.
|

Mladen,

To be more precise - the FK locking thing will require the child table to be locked in mode 4 (or 5 if the session has previously updated the child table - e.g. by deleting the current child rows), but any time you change a parent table you have to have a mode 2 or mode 3 lock (depending on version) on the child anyway - whether you modify the child or not and even when you have the relevant index in place on the child. So the action is "convert child lock up - delete parent - convert child lock down".

-- 
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com/all_postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543
Received on Wed Jun 13 2012 - 17:14:57 CDT

Original text of this message