Set echo off rem File: filestat.sql rem Date: August 23, 1996 rem Created By: Steven P. Karniotis / Compuware Corporation rem Description: rem Creates a report showing performance measurements for file I/O and rem file distribution. Query originates from UTLESTAT.SQL. rem rem Things to review: rem rem ************************************************************************** rem Modifications: rem rem rem rem rem ************************************************************************** set termout off set heading off set feedback off column tdate new_value _date noprint column database_name new_value dbname noprint column blocking new_value blkfctr noprint select to_char(sysdate, 'Dy Mon dd, yyyy hh:mi:ss') tdate, upper(v1.value) database_name, v2.value blocking from v$parameter v1, v$parameter v2 where v1.name = 'db_name' and v2.name = 'db_block_size'; set heading on set termout on set feedback on set verify off set linesize 132 set pagesize 60 set newpage 3 column ts format a15 heading "Tablespace|Name" justify center column fname format a45 heading "File|Name" justify center column phyreads format 999,999,990 heading "Physical|Reads" justify center column physwrites format 999,999,990 heading "Physical|Writes" justify center column physblksrd format 999,999,990 heading "Physical|Blocks|Read" - justify center column physblkswrt format 999,999,990 heading "Physical|Blocks|Written" - justify center break on ts on report compute sum of phyreads on report compute sum of physwrites on report compute sum of physblksrd on report compute sum of physblkswrt on report ttitle left _date center 'Database Monitoring Statistics for '&dbname - right format 90 sql.pno skip 1 - center 'I/O Performance Statistics by file' skip 2 select ts.name ts, i.name fname, x.phyrds phyreads, x.phywrts physwrites, x.phyblkrd physblksrd, x.phyblkwrt physblkswrt from v$filestat x, v$dbfile i, sys.ts$ ts, sys.file$ f where i.file# = f.file# and ts.ts# = f.ts# and x.file# = f.file# order by ts.name; ttitle left _date center 'Database Monitoring Statistics for '&dbname - right format 99 sql.pno skip 1 - center 'I/O Performance Statistics by Tablespace' skip 2 select ts.name ts, sum(x.phyrds) phyreads, sum(x.phywrts) physwrites, sum(x.phyblkrd) physblksrd, sum(x.phyblkwrt) physblkswrt from v$filestat x, v$dbfile i, sys.ts$ ts, sys.file$ f where i.file# = f.file# and ts.ts# = f.ts# and x.file# = f.file# group by ts.name order by ts.name; clear breaks clear computes clear columns ttitle off