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 DB Time Spent in the Wait

Oracle Consulting Tips by Burleson


The DB Time Spent in the Wait Oracle metric indicates the database time spent in the wait. 

You can easily measure "DB time spent in wait" with this script:

column "Statistic Name" format A40

column "Time (s)" format 999,999

column "Percent of Total DB Time" format 999,999


select e.stat_name "Statistic Name"

     , (e.value - b.value)/1000000        "Time (s)"

     , decode( e.stat_name,'DB time'

             , to_number(null)

             , 100*(e.value - b.value)


     ( select nvl((e1.value - b1.value),-1)

     from dba_hist_sys_time_model  e1

        , dba_hist_sys_time_model  b1

     where b1.snap_id              = b.snap_id

     and e1.snap_id                = e.snap_id

     and b1.dbid                   = b.dbid

     and e1.dbid                   = e.dbid

     and b1.instance_number        = b.instance_number

     and e1.instance_number        = e.instance_number

     and b1.stat_name             = 'DB time'

     and b1.stat_id                = e1.stat_id


     "Percent of Total DB Time"

  from dba_hist_sys_time_model e

     , dba_hist_sys_time_model b

 where b.snap_id                = &pBgnSnap

   and e.snap_id                = &pEndSnap



The output of this query looks like:


SQL> @Sys_time_model_int_10g.sql


Statistic Name                     Time (s) Percent of Total DB Time

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

DB time                                 169

sql execute elapsed time                156                       93

DB CPU                                  153                       90

PL/SQL execution elapsed time            77                       46

background cpu time                      53                       31

parse time elapsed                        6                        4

hard parse elapsed time                   4                        3

connection management call elapsed time   0                        0

This, and many other Oracle performance metrics are discussed in my book "Oracle Tuning" by Rampant TechPress.  You can buy it directly from the publisher and save 30% at this link:



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.