Common Root Causes

  • Long-running transactions holding uncommitted UPDATE/DELETE locks while calling external APIs.
  • Hot counter/sequence rows updated concurrently by many sessions.
  • Unindexed Foreign Key causing parent/child lock escalation or bitmap index updates in OLTP.

Proven Tuning Fixes

  • Keep transactions short; never perform HTTP calls or file I/O between DML and COMMIT.
  • Inspect V$SESSION.BLOCKING_SESSION to identify the exact blocker SQL.
  • Use SELECT ... FOR UPDATE SKIP LOCKED for queue-processing workers.

Diagnostic V$ Query

SELECT sid, serial#, blocking_session, event, seconds_in_wait, sql_id
FROM v$session WHERE event LIKE 'enq: TX%';