alter session set nls_date_format='yyyy/mm/dd hh24:mi:ss';
col "CPU_TIME(s)" for 9,990.00
col "ELAPSED_TIME(s)" for 9,990.00
set lines 100 pages 100
select * from
(
select
sql_text,
sql_id,
plan_hash_value,
executions,
last_active_time,
cpu_time/1000000 "CPU_TIME(s)",
elapsed_time/1000000 "ELAPSED_TIME(s)"
from
v$sqlstats
where
last_active_time > sysdate - 1/24
order by
elapsed_time desc
)
where rownum <= 5;
元ネタ、http://www.insight-tec.com/technical-information/2804.html
0 件のコメント:
コメントを投稿