Question: I need a script to display all
Oracle processes with high disk reads.
Answer: First see my article on
tuning disk I/O in Oracle.
The following script will display session processes in
descending order of disk reads:
--
***************************************
-- Processes with
the most disk reads
--
**************************************
select
p.spid,
s.sid,
s.process cli_process,
s.status,t.disk_reads,
s.last_call_et/3600 last_call_et_Hrs,
s.action,
s.program,
lpad(t.sql_text,30)
from
v$session s,
v$sqlarea t,
v$process p
where
s.sql_address = t.address
and
s.sql_hash_value =
t.hash_value
and
p.addr = s.paddr
-- and
--t.disk_reads > 10
order by
t.disk_reads
desc;
For more complete Oracle scripts see the
see code depot for full Oracle scripts