From: benkrug@mcs.com (Benjamin Krug)
Subject: Re: Table Locking problem
Date: 1995/12/19
Message-ID: <4b7803$il1@News1.mcs.net>#1/1
references: <4b4u4t$qb@news2.cts.com>
organization: MCSNet
newsgroups: comp.databases.oracle


In article <4b4u4t$qb@news2.cts.com>, saii@crash.cts.com (Systems Integrated) says:
>
>
>Hi,
>I'm having some unexpected trouble with locking.
>I have two tables, B and I. There is a foreign key on I that 
>references the primary key on B. When this foreign key is
>added, then I cannot delete a record from B one transaction, and
>delete another record from B from another transaction. The first
>goes through, and the second hangs until the first is committed.
>The records in I do not point to the records in B that I wish to 
>delete.
>
>There are many foreign key constraints on B, but only a couple 
>exhibit this behavior.
>
>Any ideas on this?
>
>
>Thanks in advance for any ideas.
>
>
>Gene Plagge
>System Integrated, Inc.
>619-277-0700
>email: gplagge@siwest.cts.com
>
>
>
You need to create indexes on the foreign key column in the
child table!  (Don't ask me why, I don't know.  We had the
same problem, though.  Without the index, the update takes
out a table lock on the parent!)

Ben Krug
benkrug@mcs.com


