select logon_time,
last_call_et "time inactive",
nvl(s.username, 'ORACLE PROCESS') username,
s.machine,
s.program,
s.sid session_id,
s.status,
sql_text,
ss.value "CPU used",
trunc(buffer_gets / (executions + 1)) "BUFF-EXEC",
trunc(buffer_gets / (rows_processed + 1)) "BUFF-ROWS",
first_load_time,
executions,
parse_calls,
disk_reads,
buffer_gets,
rows_processed
from v$session s, v$sesstat ss, v$statname sn, v$sqlarea sa
where s.sid = ss.sid
and ss.statistic# = sn.statistic#
and sn.name = 'CPU used by this session'
and s.sql_address = sa.address
and s.sql_hash_value = sa.hash_value
-- and last_call_et > 1000
order by machine, status, program, last_call_et asc;
last_call_et "time inactive",
nvl(s.username, 'ORACLE PROCESS') username,
s.machine,
s.program,
s.sid session_id,
s.status,
sql_text,
ss.value "CPU used",
trunc(buffer_gets / (executions + 1)) "BUFF-EXEC",
trunc(buffer_gets / (rows_processed + 1)) "BUFF-ROWS",
first_load_time,
executions,
parse_calls,
disk_reads,
buffer_gets,
rows_processed
from v$session s, v$sesstat ss, v$statname sn, v$sqlarea sa
where s.sid = ss.sid
and ss.statistic# = sn.statistic#
and sn.name = 'CPU used by this session'
and s.sql_address = sa.address
and s.sql_hash_value = sa.hash_value
-- and last_call_et > 1000
order by machine, status, program, last_call_et asc;