-
-
Save RichVRed/fb49ede2f8339103e0c0cdd8cc3616a0 to your computer and use it in GitHub Desktop.
Oracle - What statements consume the most resources (https://app.pluralsight.com/library/courses/oracle-performance-tuning-developers/table-of-contents)
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, sql_text, executions, | |
elapsed_time, cpu_time, buffer_gets, disk_reads, | |
elapsed_time / executions as avg_elapsed_time, | |
cpu_time / executions as avg_cpu_time, | |
buffer_gets / executions as avg_buffer_gets, | |
disk_reads / executions as avg_disk_reads | |
from v$sqlstats | |
where executions > 0 | |
order by elapsed_time / executions desc | |
) | |
where rownum <= 25; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment