Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: problem with foreign key
"Rüdiger J. Schulz" <johannes.schulz_at_web.de> wrote in
message news:3bc1aa64$1_at_netnews.web.de...
> hi all,
>
>
<SNIP tables>
> transaction 1: delete a row in the parent table *without*
a commit
> transaction 2: wants to insert a row in the CHILD-table
> *problem*: transaction 2 wait until transaction 1 send a
commit!!!
> is it true, that oracle lock the whole child-table, while
deleting a parent-
> key?
Yes it is true that oracle will lock the table when there is
NO INDEX on the foreign key.
create an index on child(pid) and no locks will be taken.
See http://govt.us.oracle.com/~tkyte/ Unindexed Foreign
Keys
or
http://technet.oracle.com/doc/server.815/a68003/01_05dta.htm
#1574
/Peter Received on Mon Oct 08 2001 - 11:35:25 CDT