What is a Wait Event?
When a session is not on the CPU, it is waiting for something: a disk read, a lock, a network message. Oracle names each reason a wait event. 'The database is slow' almost always means sessions are waiting on a particular event.
What Are Sessions Doing Right Now?
| Wait class | Meaning |
|---|---|
User I/O | Reading from disk |
Commit | Waiting for log writes |
Concurrency | Waiting for other sessions (latches, library cache) |
Application | Row locks, usually caused by the application |
Idle | Not a problem. The session is just waiting for work. |
Row Locks
When a session changes a row, it locks the row until it commits or rolls back. A second session trying to change the same row must wait. This is normal. It becomes a problem when the first session forgets to commit.
Find Who is Blocking Whom
Each row is a waiting session. blocker_sid is the session at the head of the queue. Look at what the blocker is doing.
status = INACTIVE. The user ran an UPDATE, did not commit and went to lunch. Ask them to commit or roll back.
Reproduce It Yourself
- Session 1:
UPDATE shop.products SET price = 1 WHERE product_id = 1;(no commit) - Session 2: run the same UPDATE. It hangs.
- Session 3 (DBA): run the blocking query above.
Kill a Session (Last Resort)
The two numbers are sid and serial# from V$SESSION. Oracle rolls back the session's uncommitted work, which can take time if it changed a lot.
Deadlocks
A deadlock happens when session A waits for a row held by B while B waits for a row held by A. Oracle detects it within seconds and raises ORA-00060 in one session, rolling back that statement. The cause is the application: both should update rows in the same order.
Other Wait Events You Will See
| Event | What to check |
|---|---|
library cache lock / latch | Hard parsing, missing bind variables |
buffer busy waits | Many sessions on the same hot block |
log file sync | Commit frequency, redo disk speed |
direct path read | Large full scans bypassing the cache |
Conclusion
Find waiting sessions in V$SESSION, follow blocking_session to the head of the queue, ask the owner to commit and kill only as a last step.

