-- 하루동안 실행된 쿼리 중 수행시간이 가장 긴 조회 쿼리 100개
SELECT B.*
FROM (
SELECT A.ELAPSED_TIME
, A.EXECUTIONS
, A.ELAPSED_TIME/(A.EXECUTIONS*<wbr />1000000) AS AVG_ELA_TIME
, A.SQL_TEXT
, A.SQL_FULLTEXT
, A.BUFFER_GETS/A.EXECUTIONS AS AVG_BUFFER_GETS
, A.DISK_READS/A.EXECUTIONS AS AVG_DISK_READS
, A.CPU_TIME/A.EXECUTIONS AS AVG_CPU_TIME
, A.MODULE
FROM (
SELECT *
FROM v$sqlarea
WHERE COMMAND_TYPE = '3'
AND LAST_ACTIVE_TIME > SYSDATE-1
AND EXECUTIONS > 0
AND MODULE LIKE 'JDBC%'
AND (SQL_TEXT LIKE '%PR_MST%' OR SQL_TEXT LIKE '%ME_LOCATION%' OR SQL_TEXT LIKE '%TBOS_%')
) A
ORDER BY A.ELAPSED_TIME/(A.EXECUTIONS*<wbr />1000000) DESC
) B
WHERE ROWNUM <= 100