The Oracle wait event model was originally
introduced in Oracle7 and eventually became a popular tuning method
despite the complex and cumbersome wait exposure interfaces.
The Oracle wait event interface evolves with
every new version of Oracle database software and provides DBAs with
valuable information or insights about where time is consumed by SQL
statements, sessions, and the data base as a whole. Wait event
information is gathered by the Oracle MMON background process,
stored in intermediate
x$ structures in a
circular SGA buffer, and later transferred to Oracle10g
Prior to Oracle10g, capturing wait event
information was a cumbersome process involving the setting of
special events like 10046 and the reading of complex trace dumps.
The new Automated Session History (ASH) tables revolutionized Oracle wait event
tuning. Earlier versions of Oracle provided special views called
v$system_event that contained
detailed information about the wait state for ongoing Oracle
transactions. This section explores how Oracle waits can be
analyzed to look for system-wide bottlenecks and individual objects
that experience wait issues.
The ASH, AWR,
and ADDM are separate components of the Oracle Enterprise
Manager Diagnostic Pack
which must be licensed as a separate option.
Fortunately, Oracle10g has simplified the way
that wait event information is captured and there are a wealth of
wrh$ views relating to
Oracle wait events as shown in Figure 16.1.
Some common ASH dba_hist views
of Oracle event data
Oracle10g has introduced some new wait events,
and the 10g database kernel now captures statistics on more than 800
specific wait events. These new wait events are the result of Oracle
breaking out their latch waits into their individual components and
breaking-out enqueue waits, or locks, into a finer level of
Whenever an AWR snapshot is taken, the
current contents of the
structures are transferred to the corresponding
tables. Since the wait information is collected in a
circular SGA buffer, wait information may be lost if this
buffer rolls over between your AWR snapshot interval.