怎麼檢視ebs裡面的請求執行時間

itpub120發表於2012-03-08
select * from ( select crs.ACTUAL_START_DATE,crs.ACTUAL_COMPLETION_DATE , floor(to_number(crs.ACTUAL_COMPLETION_DATE- crs.ACTUAL_START_DATE )*24*60) as spanMinutes ,crs.PROGRAM from FND_CONC_REQ_SUMMARY_V crs ) a where a.spanMinutes>5[@more@]

2: 佔CPU資源top5的sql查詢

select *
from (select * from v$sql order by cpu_time desc) q
where rownum <= 5

3:磁碟IO前10的sql查詢

select *
from (select round((disk_reads/decode(executions,0,-99999999,executions)))
disk_reads_per_exec,v$sql.*
from v$sql
order by disk_reads_per_exec desc) q
where rownum <= 10

4:其他的

--檢視程式CPU佔用情況的
Linux
ps auxw --sort=%cpu


--查詢IO
SELECT si.physical_reads,se.osuser, se.sid,se.serial#,pr.SPID,se.username,se.status,se.terminal,se.program,se.MODULE,se.sql_address,st.event,st.p1text,si.block_changes
,se.*
FROM v$session se, v$session_wait st,v$sess_io si,v$process pr
WHERE st.sid=se.sid  AND st.sid=si.sid AND se.PADDR=pr.ADDR AND se.sid>6 AND st.wait_time=0 AND st.event NOT LIKE '%SQL%' ORDER BY physical_reads DESC


--查詢等待
Select s.osuser, s.username,s.program,s.status,se.event,se.total_waits,se.total_timeouts,se.time_waited,se.average_wait
,s.*
from v$session s, v$session_event se
Where s.sid=se.sid And se.event not like 'SQl*Net%'And s.status ='ACTIVE'And s.username is not null
order by total_waits desc

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8109090/viewspace-1057537/,如需轉載,請註明出處,否則將追究法律責任。

相關文章