Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: whole table locks when using foreign key constraint
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
![]() |
![]() |