当前位置: 代码迷 >> SQL >> orcale 查询施行sql的效率的sql
  详细解决方案

orcale 查询施行sql的效率的sql

热度:414   发布时间:2016-05-05 13:21:01.0
orcale 查询执行sql的效率的sql
SELECT   *
    FROM   v$sqlarea v
   WHERE       executions > 0
           AND buffer_gets > 0
           AND (buffer_gets - disk_reads) / buffer_gets < 0.8
ORDER BY   v.USER_IO_WAIT_TIME DESC


SELECT executions,
       disk_reads,
       buffer_gets,
       ROUND((buffer_gets - disk_reads) / buffer_gets, 2) hit_radio,
       ROUND(disk_reads / executions, 2) reads_per_run,
       sql_text
  FROM v$sqlarea v
WHERE  v.PARSING_SCHEMA_NAME = 'JUQI'
AND executions > 0
   AND buffer_gets > 0
   AND (buffer_gets - disk_reads) / buffer_gets < 0.8
ORDER BY 4 DESC