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

 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
 Oracle Support

 SQL Tuning

 Oracle UNIX
 Oracle Linux
 Remote s
 Remote plans
 Application Server

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

 Remote S


 Consulting Staff
 Consulting Prices
 Help Wanted!


 Oracle Posters
 Oracle Books

 Oracle Scripts

Don Burleson Blog 







Oracle dba_hist_waitstat

Oracle Tips by Burleson Consulting


The dba_hist_waitstat view displays historical statistical information about block contention, and the AWR stores this information from the v$waitstat dynamic view.




Name                                      Null?    Type

 ----------------------------------------- -------- -------------

 SNAP_ID                                            NUMBER

 DBID                                               NUMBER

 INSTANCE_NUMBER                                    NUMBER

 CLASS                                              VARCHAR2(18)

 WAIT_COUNT                                         NUMBER

 TIME                                               NUMBER


This view is useful in the following situation. If the top wait events query as described above reveals the fact that the wait event buffer busy waits has a large wait time, the dba_hist_waitstat view can be queried to investigate what particular type of block caused this situation. After that, the other dba_hist specific views described below can be used to drill down to find out additional information.


For example, the dba_hist_active_sess_history view can be queried to identify particular sessions and objects that caused the high contention. The datafile and objects ids can be found in the v$session_wait dynamic view. The wait_stat_int_10g.sql query can be used to retrieve historical block contention statistics:





select e.class                                 "E.CLASS"

     , e.wait_count  - nvl(b.wait_count,0)     "Waits"

     , e.time        - nvl(b.time,0)           "Total Wait Time (cs)"

     , (e.time       - nvl(b.time,0)) /

       (e.wait_count - nvl(b.wait_count,0))    "Avg Time (cs)"

  from dba_hist_waitstat b

     , dba_hist_waitstat e

 where b.snap_id         = &pBgnSnap




The sample query output looks like:


SQL> @Wait_stat_int_10g.sql


E.CLASS                 Waits Total Wait Time (cs) Avg Time (cs)

------------------ ---------- -------------------- -------------

undo header                97                  121    1,24742268

file header block           2                  114            57


The output of the wait_stat_int_10g.sql script shows which particular buffer wait events play a significant role.


The Ion tool has a corresponding report named Buffer Waits Summary that generates time-series charts for the block contention statistics.


Figure 4.5:  AWR Buffer Waits Summary chart in Ion*


Figure 4.5 shows a Ion chart that allows the DBA to see how the database waited for particular types of buffers during the observed snapshot interval.


*       See the code depot page for instructions on downloading a free copy of Ion

This is an excerpt from my latest book "Oracle Tuning: The Definitive Reference". 

You can buy it direct from the publisher for 30%-off and get instant access to the code depot of Oracle tuning scripts:




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 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational