Re: Oracle Lock problem ! i really need help !

From: William A. Mertz <wmertz_at_infonet.net>
Date: 1996/11/16
Message-ID: <56k9nf$8jc_at_news.infocom.net>#1/1


>Here's my problem :
>
>i have two tables A & B.
>B references A by a foreign key.
>
>On the first station, when i insert a row into table B, just before the
>insert, i run a stored procedure which insert a row in table A.
>but the commit isn't made immediatly. i have to do several things before
>the commit (or rollback) which can take a long time.
>
>On the second station, i try to do the same thing (i mean inserting a
>row in table B and just before this insert, running the stored procedure
>which insert into table A), i can't launch the stored procedure.
>On this second station, eveerything is stopped, waiting for the first
>station to commit or rollback.
>
>after few searches, i've found that inserting into table A on the first
>station locks the entire table B, and so i can't do anything with table
>B from another station.
>
>coud anyone help me ?!

Try indexng TableB on the foreign key field. A similar thing happened at my company. It seems that Oracle will lock an entire table if the foreign key field is not indexed.

Bill Mertz
wmertz_at_infocom.net Received on Sat Nov 16 1996 - 00:00:00 CET

Original text of this message