Tuesday, March 29, 2011

About DB Time !

What is DB Time :
==================

DB Time : Amount of elapsed time (in microseconds) spent performing Database user-level calls.This does not include the time spent on instance background processes such as PMON.

DB Time = (cpu time+Wait Time); How many time spent against a user .

DB CPU : Amount of CPU time (in microseconds) spent on database user-level calls. This does not
include the CPU time spent on instance background processes such as PMON.

DB Time is the cumulative time spent by the database server in processing user requests .It includes wait time and cpu time of all non-idle user sessions . DB Time is displayed in the v$sess_time_model and v$sys_time_model

background cpu time : Amount of CPU time (in microseconds) consumed by database background processes

The follwing query helps to find out the DB time of Sessions :

select a.username,a.sid,b.stat_id,b.stat_name,b.value from v$session a, v$sess_time_model b where a.sid=b.sid and stat_name like 'DB time' order by value desc;

Here ,

STAT_ID : Statistic identifier for the time statistic

STAT_NAME: Name of the statistic

VALUE : Amount of time (in microseconds) that the system has spent in this operation


Note :
------

1 sec = 1000000 micro seconds

899413577 ms = 899 sec = 15 min

We can use the below query also :

select * from v$sys_time_model
select * from v$sess_time_model

No comments:

Post a Comment