Created
November 10, 2015 17:10
-
-
Save glandaverde/65c927566099d72e5a09 to your computer and use it in GitHub Desktop.
sql_id_time_waited_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 | |
| INSTANCE_NUMBER,event, | |
| time_waited "time_waited(s)", | |
| case when time_waited = 0 then | |
| 0 | |
| else | |
| round(time_waited*100 / sum(time_waited) Over(), 2) | |
| end "percentage" | |
| from | |
| ( | |
| SELECT INSTANCE_NUMBER,EVENT, SUM(TIME_WAITED) TIME_WAITED | |
| from dba_hist_active_sess_history a | |
| WHERE SQL_ID = '' | |
| AND DBID='' | |
| and snap_id BETWEEN and | |
| group by INSTANCE_NUMBER,event | |
| ) | |
| order by | |
| time_waited desc; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment