Exclusive Lock On Tables Due To Primary Key And "If Inserting" Block In Trigger
(Doc ID 1494162.1)
Last updated on FEBRUARY 03, 2019
Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.
A row exclusive lock on child tables is obtained if trigger code references the primary key of a table in the "if inserting" block, even though the triggering statement is an update, and the "if inserting" code is not firing. This can result in performance issues under load fora frequently updated table.
It is expected that a row exclusive lock be obtained during an insert, but in this case an UPDATE is issued, however the presence of the primary key reference in the INSERTING clause still results in an exclusive lock.
The behavior can be reproduced with the following:
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document