日期:2014-05-16  浏览次数:20405 次

查看Oracle CPU情况
发现那些SQL运行了大量的PARSE
?????select?sql_text,?parse_calls,?executions?from?v$sqlarea?order?by?parse_calls?desc;
--SYS的总的PARSE情况

?????select?name,?value?from?v$sysstat?where?name?like?'parse?count%';

--CPU空间及繁忙情况

select?*?from?v$osstat;

--查看每个Session的CPU利用情况:

select?ss.sid,se.command,ss.value?CPU?,se.username,se.program
from
?v$sesstat?ss,?v$session?se
where?ss.statistic#?in

(
select?statistic#
from
?v$statname
where?name?=?'CPU?used?by?this?session'
)
and?se.sid=
ss.sid
and?ss.sid>6?order?by?CPU?desc