CPU used by this session

 select
        a.SID, c.serial#, c.username, c.osuser, c.MODULE, c.status, d.spid AS
        "PROCESS_ID", DECODE(c.username, NULL, 0, c.last_call_et) AS
        "SCNDS_IDLE", ((SYSDATE - c.logon_time) * 60 * 60 * 24) AS
        "SCNDS_SINCE_LOGON", trunc(a.VALUE / 100) AS cpu_usage
       
  FROM
        v$sesstat a, v$sysstat b, v$session c, v$process d WHERE
        c.SID = a.SID AND c.paddr(+) = d.addr AND
        a.statistic# = b.statistic# AND b.NAME = 'CPU used by this session'
        ORDER BY c.status ASC, a.VALUE DESC;

你可能感兴趣的:(DB,Tuning,session,null,c)