set lines 300;
set pages 500;
set long 1000000;
select A.hash_value, A.text_subset, A.module, trunc((B.cpu_time-A.cpu_time)/1000) “CPU_TIME(ms)”, B.executions-A.executions executions,
trunc(decode(B.executions-A.executions, 0, 0, (B.cpu_time-A.cpu_time)/(B.executions-A.executions))/1000) “CPU_TIME_PER_EXEC(ms)”
from STATS$SQL_SUMMARY  A, STATS$SQL_SUMMARY  B
where A.hash_value = B.hash_value
and A.snap_id = &begin_snap
and B.snap_id = &end_snap
order by “CPU_TIME(ms)” desc;

Recommended Posts

Start typing and press Enter to search