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

Home -> Community -> Usenet -> c.d.o.server -> Re: whole table locks when using foreign key constraint

Re: whole table locks when using foreign key constraint

From: Ron Reidy <rereidy_at_indra.com>
Date: Wed, 21 Nov 2001 05:32:40 -0700
Message-ID: <3BFB9EE8.8E5BE1BA@indra.com>


Dean Taylor wrote:
>
> I have a foreign key on table A which references table B.
> If change a row in B but do not commit it then change the row in A
> which references it, then the second statement will hang waiting for
> the first to commit or rollback. That is expected. However if I then
> try to change a different row in A it also hangs even though it should
> not be affected. Somone told me that adding an index to the
> referencing rows in A would solve the problem is it does not seem to.
> Does anyone know a way to avoid locking the whole table when waiting
> for a foreign key check to complete?

Create an index on the FK column.

-- 
Ron Reidy
Oracle DBA
Reidy Consulting, L.L.C.
Received on Wed Nov 21 2001 - 06:32:40 CST

Original text of this message

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