Created
November 10, 2015 17:36
-
-
Save glandaverde/7a55057cfdfd932faae1 to your computer and use it in GitHub Desktop.
top sql in awr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from ( | |
SELECT SQL_ID, MODULE, ACTION, RANK () OVER (ORDER BY avgt DESC) AS ELAPSED_RANK,avgt as "execution time(sec)" from | |
( | |
select SQL_ID, MODULE, ACTION,ROUND(SUM(ELAPSED_TIME_DELTA)/SUM(decode(executions_delta,0,1,executions_delta))/1000000,5) avgt | |
FROM DBA_HIST_SQLSTAT | |
where SNAP_ID between and | |
group by SQL_ID, MODULE, ACTION | |
)) | |
WHERE ELAPSED_RANK <= 15; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment