Forked from ryanthames/sessions_consuming_resources.sql
Created
April 28, 2017 23:56
-
-
Save RichVRed/dfb365e1d1c9315fcff82549604376b7 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