Created
January 21, 2014 10:20
-
-
Save joseporiol/8537573 to your computer and use it in GitHub Desktop.
CPU usage of the user
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
SELECT ss.username, se.SID, VALUE / 100 cpu_usage_seconds | |
FROM v$session ss, v$sesstat se, v$statname sn | |
WHERE se.STATISTIC# = sn.STATISTIC# | |
AND NAME LIKE '%CPU used by this session%' | |
AND se.SID = ss.SID | |
AND ss.status = 'ACTIVE' | |
AND ss.username IS NOT NULL | |
ORDER BY VALUE DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment