My Oracle Support Banner

FAQ: What are Latches and What Causes Latch Contention (11g and Above) (Doc ID 1970450.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Personal Edition - Version 11.1.0.6 and later
Oracle Database - Enterprise Edition - Version 11.1.0.6 and later
Oracle Database - Standard Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.

Purpose

A number of different locking mechanisms are used to protect data from concurrent access including latches, enqueues, distributed locks and global locks (used in RAC).

This bulletin focuses on latches and aims to provide a clear understanding of how latches are implemented and the causes of latch contention. The information provided can be used in tuning the various kinds of latches discussed.

Note: It is important to understand that it is neither practical nor possible to provide specific values for the init.ora parameters discussed in this bulletin. The values for these parameters vary from database to database and from platform to platform. Moreover, for the same database and platforms, they may vary from application to application.

For advice on earlier versions, refer to:

<Document 22908.1> FAQ: What are Latches and What Causes Latch Contention (Pre-11g)

 

Questions and Answers

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Purpose
Questions and Answers
 What is a latch?
 What is the difference between latches and enqueues?
 What is differences between latches and mutexes?
 When is a latch obtained?
 What are the possible latch request mode?
 Spin Count
 What causes latch contention?
 How to identify contention for latches?
 How get the hit ratio for latches
 Useful SQL scripts to get latch information using the views:
 Find the latch name and 'sleeps'
 Find latch name, address, gets, misses, sleeps, etc:
 Display latch statistics by latch name
 Contention on Latches and Mutexes that are of most concern to the DBA:
 BUFFER CACHE LATCH
 LIBRARY CACHE LATCHES
 LIBRARY CACHE PIN LATCH
 SHARED POOL LATCHES
 ROW CACHE OBJECTS LATCH 
 REDOLOG BUFFER LATCHES
 MUTEXES 
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.