Octoping의 블로그
오라클 DB에서 슬로우 쿼리 확인하기
언어/SQL 2023. 4. 13. 13:48

SELECT * FROM( SELECT ROUND(NVL((ELAPSED_TIME / DECODE(EXECUTIONS, 0, NULL, EXECUTIONS)/1000000 ), 0),3) AS ELAPSED_TIME , LAST_ACTIVE_TIME , HASH_VALUE , SQL_TEXT FROM V$SQL WHERE LAST_ACTIVE_TIME >= TO_DATE('20221125', 'YYYYMMDD') ) WHERE ELAPSED_TIME > 5 ORDER BY ELAPSED_TIME DESC;