Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

The stats$latch Table

Oracle Tips by Burleson Consulting
Don Burleson

Internal to Oracle, latches are used to serialize transactions and are closely tied to the OS semaphores. If the user is planning to perform operations such as accessing data, this user must first obtain all latch data from the table and then become the owner of the latch. If the user's process is forced to wait for a latch because there isn't enough space available, a slowdown will occur and we would experience internal contention for latches.  For a complete description of the v$ views, get the "free 11g poster" sponsored by UNISYS. 

As we can see from the listing of the v$latch view next, there are many different kinds of latches that are used internally within Oracle. Regardless of the types of latches the important thing is the hit ratio.

The key latches are:

        Cache buffers lru chain latch

        Enqueues latch

        Redo allocation latch

        Redo copy latch

        Library cache latch

If the hit ratio for any of these key latches is lower than 99 percent, there is substantial latch contention within the database. The contention for these key latches can be reduced in a variety of ways, including tuning the database writer, tuning the redo log files, and reducing buffer cache latch contention. We will be going into detail on these techniques in Chapter 9.

The latch hit ratio is the ratio of the total number of latch misses to the number of latch gets for all latches. A low value for this ratio indicates a latching problem, whereas a high value is generally good. However, as the data is rolled up over all latches, a high latch hit ratio can artificially mask a low get rate on a specific latch. Oracle tuning professionals will cross-check this value with the top 5 wait events to see if latch free is in the list, and refer to the latch sections of the report.

SQL> desc STATS$LATCH;
 Name                                      Null?    Type
 ----------------------------------------- -------- -------------------
 SNAP_ID                                   NOT NULL NUMBER(6)
 DBID                                      NOT NULL NUMBER
 INSTANCE_NUMBER                           NOT NULL NUMBER
 NAME                                      NOT NULL VARCHAR2(64)
 LATCH#                                    NOT NULL NUMBER
 LEVEL#                                             NUMBER
 GETS                                               NUMBER
 MISSES                                             NUMBER
 SLEEPS                                             NUMBER
 IMMEDIATE_GETS                                     NUMBER
 IMMEDIATE_MISSES                                   NUMBER
 SPIN_GETS                                          NUMBER
 SLEEP1                                             NUMBER
 SLEEP2                                             NUMBER
 SLEEP3                                             NUMBER
 SLEEP4                                             NUMBER
 WAIT_TIME                                          NUMBER



 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.