Oracle 查看当前执行IO次数最多的SQL
- - 数据库 - ITeye博客--查询当前执行IO最多的sql,并按大到小来排序. select cast(buffer_gets/decode(EXECUTions,0,10000,EXECUTions) as int) 平均IO ,. EXECUTions 执行次数,buffer_gets 总逻辑IO,disk_reads 硬盘读取,.
SELECT se.sid, se.serial#, pr.SPID, se.username, se.status, se.terminal, se.program, se.MODULE, se.sql_address, st.event, st.p1text, st.p1, st.p2, st.p3, st.STATE, st.SECONDS_IN_WAIT, si.physical_reads, si.block_changes 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