Skip to content
Home » Oracle Database » Performance » AWR » How to Read Time Model Statistics

How to Read Time Model Statistics

Time Model

There's a section in AWR report called Time Model Statistics which is used to analyze overall time consumed by foreground sessions in the database.

The goal of analyzing time model is to find the pattern and reduce DB time, the less DB time the better performance.

To better understand Time Model, we should consider the following 2 dimensions.

  1. CPU-Time Measurement
  2. Elapsed-Time Measurement

CPU-Time Measurement

For every ACTIVE session in the system, DB time has 2 major components.

DB Time = DB CPU Time + Non-idle Wait Time

DB CPU Time

DB CPU Time is pretty straight-forward, the overall accumulated time consumed by CPU, mostly multi-core processor at the state of the art, so DB time is usually over the elapsed time in a production environment.

Further reading: How to Read CPU Utilization in AWR.

Non-Idle Wait Time

I also call it as "Non-CPU Active Time", which may include disk IO, networking and other non-CPU activities from ACTIVE sessions. Traditionally, disk IO is the most time-consuming resource beside CPU.

Both are accumulated in the instance in the specific AWR interval.

Elapsed-Time Measurement

Now we turn to AWR. For example, we saw the section of Time Model Statistics from an AWR report like this:

Time Model Statistics in AWR
Time Model Statistics in AWR

The group of elapsed-time statistics basically has hierarchy, one may comprise the other. The major problem of the list is that it's flat and doesn't show their hierarchical relationships.

Consequently, DBA hardly explain "Time Model Statistics" well to their clients, which sometimes leads to the loss of credibility.

According to Oracle documentation about V$SESS_TIME_MODEL, its hierarchy is as below:

1) background elapsed time
    2) background cpu time
          3) RMAN cpu time (backup/restore)
1) DB time
    2) DB CPU
    2) connection management call elapsed time
    2) sequence load elapsed time
    2) sql execute elapsed time
    2) parse time elapsed
          3) hard parse elapsed time
                4) hard parse (sharing criteria) elapsed time
                    5) hard parse (bind mismatch) elapsed time
          3) failed parse elapsed time
                4) failed parse (out of shared memory) elapsed time
    2) PL/SQL execution elapsed time
    2) inbound PL/SQL rpc elapsed time
    2) PL/SQL compilation elapsed time
    2) Java execution elapsed time
    2) repeated bind elapsed time

In my opinion, removing "DB CPU" (CPU-time Measurement) from the list may have a more consistent result aligning with DB time.

Leave a Reply

Your email address will not be published. Required fields are marked *