Database Reference
In-Depth Information
No-Wait Mode
If a process attempts to get a latch in no-wait mode and finds out that the latch is not available, instead of spinning
and trying again, it would make a request for the latch again immediately.
Oracle database provides instrumentation on the various types of latches. To be precise, in Oracle Database 12c
Release 1 Oracle provides instrumentation through 703 types of latches (compared to 553 in Oracle 11g Release 2
and 394 in Oracle 10g Release 2). When optimizing database operations, special attention should be given to latch
statistics. Tuning database operations and reducing latch contention would help improve the overall response times;
that having been said, many of the latches are required latches for Oracle to complete its operation. While V$LATCH
provides latch statistics for the overall database behavior, V$GES_LATCH 3 filters latch statistics for a RAC environment.
Like the generic latches, RAC-related latches are also measured by hits, misses—the number of spins before which the
process was able to acquire a latch—and the total time it waited to get the latch. The higher number of misses could
indicate the operation had to spin several times, which in turn potentially indicates a higher wait time to acquire a
latch. The higher spin and wait times for a latch would indicate shortage of resources mostly centered on contention
for the CPU.
The output following is the number of times the latch was acquired by sessions on one of the instances in a RAC
cluster in an Oracle Database 12c Release 1 environment:
Script: MVRACPDnTap_dlmlatch.sql
SELECT inst_id INT,
latch#,
level#,
name,
gets,
misses,
gets / misses RATIO,
sleeps,
spin_gets,
immediate_gets Igets,
immediate_misses Imisses,
wait_time / 1000000 "WT"
FROM gv$latch
WHERE misses > 1000
ORDER BY inst_id,
spin_gets DESC;
V$GES_LATCH is depreciated in Oracle Database 12c Version 1.
3
 
Search WWH ::




Custom Search