Re: Locks; default incorrect w/ PL/SQL?
Date: Wed, 16 Feb 1994 17:55:54 GMT
Message-ID: <9402160955.AA54660_at_mhiba3.rvax4>
In article <1994Feb16.051304.16829_at_exu.ericsson.se>, hans_at_ebu.ericsson.se
(Hans Bergsten) writes:
>
> I have run into some strange behavior regarding default locks acquired
> during PL/SQL processing. My platform is ORACLE 7.0.15 on a SunOS 4.1.x/
> Sparc.
>
We had a similar problem, but it wasen't do to the triggers, instead, it was due to foreign key constraints.
Example: Suppose you have the table ORDERS with primary key ORDER_ID and you have the table ORDER_ITEMS with ORDER_ID as a foreign key to ORDERS.
Then you insert/update into the ORDER_ITEMS table. A shared lock will ocurr on the table UNLESS there is an index on ORDER_ITEMS(ORDER_ID).
So to fix the problem, put indexes on the foreign keys.
Hib Engler - Consultant
(415)852-1469
Received on Wed Feb 16 1994 - 18:55:54 CET