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: problem with foreign key

Re: problem with foreign key

From: Peter Laursen <pl_at_mail1.remove.this.stofanet.dk>
Date: Mon, 8 Oct 2001 18:35:25 +0200
Message-ID: <3bc1d6cd$0$11605$ba624c82@nntp01.dk.telia.net>

"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

Original text of this message

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