Skip to content

Instantly share code, notes, and snippets.

@ryanthames
Created April 1, 2016 14:36
Show Gist options
  • Select an option

  • Save ryanthames/c415adfa93148eec3266d0bca14e3dc4 to your computer and use it in GitHub Desktop.

Select an option

Save ryanthames/c415adfa93148eec3266d0bca14e3dc4 to your computer and use it in GitHub Desktop.
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