Files
oracle/vdh/top_sess_by_cpu.sql

9 lines
290 B
MySQL
Raw Permalink Normal View History

2026-03-12 21:23:47 +01:00
select *
from ( select C.sid, C.serial#, A.value, C.program
from v$sesstat A, v$statname B, v$session C
where A.statistic# = B.statistic#
and B.name = 'CPU used by this session'
and A.sid = C.sid
order by value desc
)
where rownum <= 10;