Created
April 1, 2016 14:36
-
-
Save ryanthames/c415adfa93148eec3266d0bca14e3dc4 to your computer and use it in GitHub Desktop.
Oracle - What sessions are consuming 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 s.sid, s.username, s.osuser, | |
| to_char(sm.begin_time, 'HH24:MI:ss') as interval_start, | |
| to_char(sm.end_time, 'HH24:MI:ss') as interval_end, | |
| s.machine, s.process, s.program, s.module, | |
| sm.cpu, sm.pga_memory, sm.logical_reads, sm.physical_reads, | |
| sm.hard_parses, sm.soft_parses, | |
| s.logon_time | |
| from v$session s, v$sessmetric sm | |
| where sm.session_id = s.sid | |
| and s.type = 'USER' | |
| order by sm.cpu desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment