enq: TX - row lock contention: Wait: session blocked on a row-level lock held by another transaction
OracleWhat does it mean?
A session is waiting for a row lock held by another transaction to be released. This is the classic application-level lock wait event.
Why does it happen?
Concurrent transactions trying to update the same row, transactions left uncommitted for a long time, broad locking caused by unindexed foreign keys, or concentration on a sequential key (hot block).
How to fix it
Find the blocking and blocked sessions: SELECT * FROM v$session WHERE blocking_session IS NOT NULL; and correlate with v$lock. If long transactions are the root cause, review the commit strategy. Index foreign key columns. Rethink the design (sequence, hash) for hot rows. Terminate the blocking session when necessary.
More from this engine
- ORA-01578Oracle data block corrupted (file #, block #)
- ORA-01722Invalid number
- ORA-02049Timeout: distributed transaction waiting for lock
- log file syncWait: session waiting for LGWR to flush redo to disk on commit
- db file sequential readWait: single-block physical read, typically an index or table lookup
- db file scattered readWait: multi-block physical read, typically a full table or index fast full scan
- buffer busy waitsWait: contention for a buffer already being read or modified by another session