What is DB Time?
DB Time is the total time spent by the all user processes which are actively working or actively waiting in the database calls. It includes the CPU Time, IO Wait time and non-idle time. It tells us that how much activity performed by the database for the duration.
Can database have higher DB Time than Elapsed Time?
Yes. Database can have higher DB Time than Elapsed Time as database can have multiple CPUs and multiple database calls.
Example: Suppose there are 5 active sessions present on the database which are executing some long running queries. Now consider the duration of 5 Minutes i.e. Elapsed Time = 5 Min. In this case what will be the DB Time? As 5 active Sessions are executing queries for the entire duration of 5 Minutes, my DB Time will be 25 Min. Now again read the DB Time definition stated above.
When DB time gets increase?
- DB Time increases when system load increases. If database call increases then DB time increases.
- DB Time increases when system performance degrades. When IO wait time increases then oracle will spend more time for IO which results in higher DB time.
- If database host is CPU bound then sessions will wait on active run queue resulting increase in DB time.
Where to find DB time in AWR report?
There are two places where you can find the DB Time in AWR report.
- At The Start of AWR Report.
- Wait Event Statistics –> Time Model Statistics