select *
from (select v.sql_id,v.child_number,v.sql_text,v.elapsed_time,v.cpu_time,v.disk_reads,rank() over(order by v.elapsed_time desc) elapsed_rank
from v$sql v) a
where elapsed_rank <= 10;
2.查看cpu消耗时间最多的前10条sql语句
by v.cpu_time 3.查看消耗磁盘读取最多的前10条sql语句
by v.disk_reads 10;
转自: http://www.tuicool.com/articles/v2Mfii原文链接:https://www.f2er.com/oracle/211547.html