doc

    Name:   diskperc.sql

    Author: Mark Gurry


The following script provides information on datafile reads and writes.

#

drop table tot_read_writes;
create table tot_read_writes
 as select sum(phyrds) phys_reads, sum(phywrts) phys_wrts
      from v$filestat;
ttitle ' Disk I/O s by Datafile '
column name format a30
column phyrds format 999,999,999
column phywrts format 999,999,999
column read_pct format 999.99        
column write_pct format 999.99        
select name, phyrds, phyrds * 100 / trw.phys_reads read_pct, 
             phywrts,  phywrts * 100 / trw.phys_wrts write_pct
  from  tot_read_writes trw, v$datafile df, v$filestat fs 
 where df.file# = fs.file# 
 order by phyrds desc; 