set echo off; set feedback off; set verify off; connect sys/xxx; drop view stats$file_view; create view stats$file_view as select ts.name ts, i.name name, x.phyrds pyr, x.phywrts pyw, x.readtim prt, x.writetim pwt, x.phyblkrd pbr, x.phyblkwrt pbw from v$filestat x, ts$ ts, v$datafile i,file$ f where i.file#=f.file# and ts.ts#=f.ts# and x.file#=f.file#; drop table stats$begin_file; create table stats$begin_file as select * from stats$file_view where 0 = 1; drop table stats$end_file; create table stats$end_file as select * from stats$begin_file; Rem ******************************************************************** Rem Gather start statistics Rem ******************************************************************** insert into stats$begin_file select * from stats$file_view;