Created
September 25, 2019 11:35
-
-
Save yogananda-muthaiah/79aa1d8fa565746c3acec97022958c8d to your computer and use it in GitHub Desktop.
Oracle PL SQL - Identify top SQL statements causing long running
This file contains 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
To find the top SQL statements that have caused most block buffer reads: | |
Select buffer_gets, sql_text | |
from v$sqlarea | |
where buffer_gets > 10000 | |
order by buffer_gets desc; | |
To find the most frequently executed SQL: | |
Select executions, buffer_gets, sql_text | |
from v$sqlarea | |
where executions > 10000 | |
order by executions desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment