The Oracle Row Cache Lock wait event is associated with a specific enqueue type on a data dictionary row. Checking activity within the V$ROWCACHE view is a good place to start for understanding this relationship, as tuning can only be accomplished with analysis of the enqueue type.
1. Tuning for Oracle Row Cache
Lock Waits
By Don Bergal
Confio Software
12/10/2013
1
2. What are Oracle Row Cache Lock
Waits—Part 1
• To execute, DDL (Data Definition
Language) must acquire a row cache lock to
lock the data dictionary information
• The shared pool contains a cache of rows from
the data dictionary:
– Helps reduce physical I/O to the data dictionary
tables
– Allows locking of individual data dictionary rows
12/10/2013
2
3. What are Oracle Row Cache Lock
Waits—Part 2
• The locks on the data dictionary rows are
called row cache enqueue locks
• The enqueue lock structures are allocated
from the shared pool as needed
• When these requests wait and time out, the
row cache lock wait event happens
12/10/2013
3
4. A Closer Look at the Row Cache
Lock Wait Event
• Each row cache lock is on a specific data dictionary object
• Called the enqueue type
• Can be found in the v$rowcache view
– For example, in this sample you can find the enqueue types and the
type of activity being performed within the dictionary cache
12/10/2013
4
5. Tuning for Oracle Row Cache
Lock Waits
• Waits are associated with a specific enqueue type on a
data dictionary row
• Check activity within the V$ROWCACHE view
– Determine the enqueue type (see next slide)
• If a Trace file is available, you may also see the
following error:
>> WAITED TOO LONG FOR A ROW CACHE ENQUEUE LOCK! <<
• This wait may appear more frequently with Oracle RAC:
– The library cache and the row cache are global in RAC, and
so the row cache lock wait may be more pronounced
12/10/2013
5
6. Tuning Common Row Cache
Enqueue Lock Types
• Common row cache enqueue lock types include:
– DC_SEQUENCES
• May occur during the use of sequences.
• Tune by checking sequences to see if they have the cache option specified and if that
cache value is reflective of the anticipated simultaneous inserts by the application.
– DC_USED_EXTENTS and DC_FREE_EXTENTS
• May occur during space management operations where tablespaces are fragmented or
have inadequate extent sizes.
• Tune by checking whether tablespaces are fragmented, extent sizes are too small, or
tablespaces are managed manually.
– DC_TABLESPACES
• May occur during the allocation of new extents. If extent sizes are set too low the
application may frequently request new extents which could cause contention.
• Tune by checking for rapidly increasing number of extents.
– DC_OBJECTS
• May occur during the recompilation of objects. If object compiles are occurring this can
require an exclusive lock which will block other activity.
• Tune by examining invalid objects and dependencies.
12/10/2013
6
7. Find Root Cause of Waits Quickly
with Confio Ignite
• Improve database performance by 65% with
Confio Ignite
– Identify bottlenecks and root causes of waits like
these in minutes
– Installs in minutes
– Puts no load on monitored servers
Download Ignite trial for free
www.confio.com/freetrial
12/10/2013
7