Database Administration (MOSC)

MOSC Banner

DB Locks on self referencing table

edited Apr 22, 2013 8:00PM in Database Administration (MOSC) 4 commentsAnswered ✓
We have a table with a primary key and a foreign key referencing the same table. We noticed frequent locks on this table because the floowing simple scenario.

Session 1:

delete table_name where pk_column='A';

Session 2:(without commiting session 1)

delete table_name where pk_column='B';

Then second session will lock waiting for first session to commit.

On the table table_name there is another column fk_column wich references table_name(pk_column).

Is there any remedy?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center