--执行时间最长的
select rownum as rank, a.*
from (
select elapsed_Time,
executions,
buffer_gets,
disk_reads,
cpu_time
hash_value,
sql_text,
sql_fulltext
from v$sqlarea
where elapsed_time > 20000
order by elapsed_time desc) a
where rownum < =10
--sCPU TIME最大的
elect rownum as rank, a.*
from (
select elapsed_Time,
executions,
buffer_gets,
disk_reads,
cpu_time
hash_value,
sql_text,
sql_fulltext
from v$sqlarea
where cpu_time > 20000
order by cpu_time desc) a
where rownum < =10
--逻辑读最多的
select rownum as rank, a.*
from (
select buffer_gets,
executions,
buffer_gets/ decode(executions,0,1, executions) gets_per_exec,
hash_value,
sql_text,
sql_fulltext
from v$sqlarea
where buffer_gets > 50000
order by buffer_gets desc) a
where rownum < =10
--物理读最多的
select rownum as rank, a.*
from (
select disk_reads,
executions,
disk_reads / decode(executions,0,1, executions) reads_per_exec,
hash_value,
sql_text,
sql_fulltext
from v$sqlarea
where disk_reads > 10000
order by disk_reads desc) a
where rownum < =10
处理的数据量最大的
select rownum as rank, a.*
from (
select rows_processed,
executions,
rows_processed / decode(executions,0,1, executions) rows_per_exec,
hash_value,
sql_text,
sql_fulltext
from v$sqlarea
where rows_processed > 10000
order by rows_processed desc) a
where rownum < =10 |
|