--發現那些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;
--比較一下哪個session的cpu使用時間最多,然後檢視該session的具體情況:
select s.sid, s.event, s.machine, s.osuser, s.wait_time, w.seq#, q.sql_text
from v$session_wait w, v$session s, v$process p, v$sqlarea q
where s.paddr = p.addr
and s.sid = &p
and s.sql_address = q.address;
--占用cpu最高的10個session及其sql語句
select s.sid,
w.wait_time,
w.seconds_in_wait,
w.state,
w.wait_time_micro,
w.time_remaining_micro,
w.time_since_last_wait_micro,
p.username,
status,
server,
schemaname,
osuser,
machine,
p.terminal,
p.program,
logon_time,
w.event,
w.wait_class,
tracefile,
sql_text,
last_active_time
from v$session_wait w, v$session s, v$process p, v$sqlarea q
where s.paddr = p.addr
and s.sid in (select sid
from (select ss.sid
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 ss.value desc)
where rownum < 11)
and s.sql_address = q.address;
ExecutorService使用情況
1 executorservice是是乙個介面,繼承了executor 2 而executor亦是乙個介面,該介面只包含了乙個方法void execute runnable command 3 executors 該類是乙個輔助類,此包中所定義的 executor executorservice s...
前端This使用情況
一 普通函式的this指向window。二 物件方法中this指向呼叫者。三 建構函式中this。1 function newperson name,age const p1 new person 張三 18 return的內容為基本資料型別為p1,return的內容為引用資料型別為其本身 cons...
查詢表空間使用情況
select owner,tablespace name,segment name,segment type,sum bytes 1024 1024 sums from dba extents where owner nbcheck and segment type table group by o...