Oracle Top Latches Monitor

Displays latch statistics ordered by highest misses, including gets, misses, sleeps, and spin gets. Useful for identifying latch contention and diagnosing concurrency or performance bottlenecks.

oraclesqlperformance-tuningv1.0.0
0 stars0 downloads13 views0 comments
By OracleDba • Created

Code

(21 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/top_latches.sql
-- Author       : Tim Hall
-- Description  : Displays information about the top latches.
-- Requirements : Access to the V$ views.
-- Call Syntax  : @top_latches
-- Last Modified: 15-JUL-2000
-- -----------------------------------------------------------------------------------
SET LINESIZE 200

SELECT l.latch#,
       l.name,
       l.gets,
       l.misses,
       l.sleeps,
       l.immediate_gets,
       l.immediate_misses,
       l.spin_gets
FROM   v$latch l
WHERE  l.misses > 0
ORDER BY l.misses DESC;

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!