oracle 中查询超过10秒以上的sql语句(性能优化)

执行前修改a.last_LOAD_TIME过滤条件

select *
  from (select v.sql_id,
               v.sql_text,
               v.sql_fulltext,
               v.FIRST_LOAD_TIME,
               v.last_load_time,
               v.elapsed_time,
               v.cpu_time,
               v.disk_reads,
               v.EXECUTIONS,
               v.LOADS,
               v.cpu_time / v.executions / 1000 / 1000 ave_cpu_time,
               v.ELAPSED_TIME / v.executions / 1000 / 1000 ave_time
          from v$sql v) a
 where a.last_LOAD_TIME > '2015-11-09/09:24:47'  and ave_time > 10 and a.executions > 0 order by ave_time desc 

你可能感兴趣的:(数据库,ORACLE,sql,性能,优化,oracle)