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 Metric Total Wait Time

Oracle Consulting Tips by Burleson


The Total Wait Time Oracle metric is the total amount of time waited for this event, in hundredths of a second.

The next query against the dba_hist_active_sess_history view reports a list of resources that were in high demand in the last hour. This query does not reflect idle wait events.

select                           "Wait Event",
   SUM(h.wait_time + h.time_waited  ) "Total Wait Time"
   v$active_session_history     h,
   v$event_name                 e
   h.event_id = e.event_id
   e.wait_class <> 'Idle'
group by
order by 2 DESC;
This query produces a listing like the one below, showing aggregate wait time for each event:
Wait Event                       Total Wait Time
------------------------------   ---------------
log buffer space                      9,638,484
db file sequential read               8,442,918
log file switch completion            5,231,711
write complete waits                  5,200,368
db file scattered read                 4452,153
process startup                        3623,464
rdbms ipc reply                         917,765
log file sync                           662,224
latch free                              550,241
latch: library cache                    370,696
db file parallel write                  364,641
free buffer waits                       319,151
latch: redo allocation                   64,984
LGWR wait for redo copy                  63,647
read by other session                    52,757
log file sequential read                 46,126
null event                               33,011
log file parallel write                  26,280
SQL*Net E "SQL*Net"  more data to client               8,894
latch: cache buffers chains               7,005
control file sequential read              3,966
direct path read temp                       395
direct path write temp                      229
SQL*Net E "SQL*Net"  message to client                    74

From the listing above, one can see that the DBA has an issue with the log buffer space wait   event that may indicate the need to increase the log_buffer  parameter to increase the cache in order to minimize this possible bottleneck. 

Using the AWR ASH view, the DBA can also retrieve a list of database users who have experienced high wait times during the time period between any two snapshots. The following query can be used to identify these target users



   sum(h.wait_time + h.time_waited E "time_waited" ) "total wait time"
   v$active_session_history      h,
   v$session                   s,
   v$event_name             e
   h.session_id = s.sid
   e.event_id = h.event_id
   e.wait_class <> 'Idle'
   s.username IS NOT NULL
group by
   s.sid, s.username
order by 3;


This sample output shows the total wait time, both by process ID (SID) and by individual users.

       SID    USERNAME          total wait time
----------    ---------------   ---------------
       261    SYS                     1,537,288
       259    SYS                    12,247,007
       254    SYS                    18,640,736

If you are looking to enhance your Oracle tuning skills, you may enjoy Rampant TechPress – Oracle Tuning: The Definitive Reference by Donald K. Burleson , with over 900 pages of BC's favorite tuning tips & scripts. 

 You can buy it directly from the publisher 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 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.