Last active
August 3, 2017 08:56
-
-
Save teopost/e642af022485ffa83bf6930dad8e63b7 to your computer and use it in GitHub Desktop.
List Oracle slow query
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
| /* https://stackoverflow.com/questions/148648/oracle-is-there-a-tool-to-trace-queries-like-profiler-for-sql-server */ | |
| SELECT | |
| S.LAST_ACTIVE_TIME, | |
| S.MODULE, | |
| S.SQL_FULLTEXT, | |
| S.SQL_PROFILE, | |
| S.EXECUTIONS, | |
| S.LAST_LOAD_TIME, | |
| S.PARSING_USER_ID, | |
| S.SERVICE | |
| FROM | |
| SYS.V_$SQL S, | |
| SYS.ALL_USERS U | |
| WHERE | |
| S.PARSING_USER_ID=U.USER_ID | |
| AND UPPER(U.USERNAME) IN ('oracle user name here') | |
| ORDER BY TO_DATE(S.LAST_LOAD_TIME, 'YYYY-MM-DD/HH24:MI:SS') desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment