Find Sessions Consuming Lot Of CPU

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 27 Aug, 2023
  • 0 Comments
  • 20 Secs Read

Find Sessions Consuming Lot Of CPU

col program form a30 heading “Program”

col CPUMins form 99990 heading “CPU in Mins”

select rownum as rank, a.*

from (

SELECT v.sid, program, v.value / (100 * 60) CPUMins

FROM v$statname s , v$sesstat v, v$session sess

WHERE s.name = ‘CPU used by this session’

and sess.sid = v.sid

and v.statistic#=s.statistic#

and v.value>0

ORDER BY v.value DESC) a

where rownum < 11;