вторник, 2 ноября 2010 г.

Использование CPU сессиями

# Username - Name of the user
# SID - Session id
# CPU Usage - CPU centiseconds used by this session (divide by 100 to get real CPU seconds)

    select     nvl(ss.USERNAME,'ORACLE PROC') username,
        se.SID,
        VALUE cpu_usage
    from     v$session ss,
        v$sesstat se,
        v$statname sn
    where      se.STATISTIC# = sn.STATISTIC#
    and      NAME like '%CPU used by this session%'
    and      se.SID = ss.SID
    order      by VALUE desc

Комментариев нет:

Отправить комментарий