Oracle Latches Statistics Report
This script displays statistics for all current Oracle latches. It queries the V$LATCH view to show latch IDs, names, gets, misses, sleeps, and spin statistics, helping DBAs analyze latch behavior and diagnose concurrency or performance issues.
oraclesqlperformance-tuningv1.0.0
0 stars0 downloads3 views0 comments
By OracleDba • Created
Code
(20 lines)1234567891011121314151617181920
-- -----------------------------------------------------------------------------------
-- File Name : https://oracle-base.com/dba/monitoring/latches.sql
-- Author : Tim Hall
-- Description : Displays information about all current latches.
-- Requirements : Access to the V$ views.
-- Call Syntax : @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
ORDER BY l.name;