原文链接V$FILESTATThis view displays the number of physical reads and writes done and the total number of single-block and multiblock I/Os done at file level. As of Oracle Database 10g Release 2 (10.2), this view also includes reads done by RMAN processes for backup operations. | ||
Column | Datatype | Description |
---|---|---|
FILE# | NUMBER | Number of the file |
PHYRDS | NUMBER | Number of physical reads done |
PHYWRTS | NUMBER | Number of times DBWR is required to write |
PHYBLKRD | NUMBER | Number of physical blocks read |
PHYBLKWRT | NUMBER | Number of blocks written to disk, which may be the same as PHYWRTS if all writes are single blocks |
SINGLEBLKRDS | NUMBER | Number of single block reads |
READTIM | NUMBER | Time (in hundredths of a second) spent doing reads if the TIMED_STATISTICS parameter istrue; 0 if false |
WRITETIM | NUMBER | Time (in hundredths of a second) spent doing writes if the TIMED_STATISTICS parameter istrue; 0 if false |
SINGLEBLKRDTIM | NUMBER | Cumulative single block read time (in hundredths of a second) |
AVGIOTIM | NUMBER | Average time (in hundredths of a second) spent on I/O, if the TIMED_STATISTICS parameter is true; 0 if false |
LSTIOTIM | NUMBER | Time (in hundredths of a second) spent doing the last I/O, if the TIMED_STATISTICSparameter is true; 0 if false |
MINIOTIM | NUMBER | Minimum time (in hundredths of a second) spent on a single I/O, if the TIMED_STATISTICSparameter is true; 0 if false |
MAXIORTM | NUMBER | Maximum time (in hundredths of a second) spent doing a single read, if theTIMED_STATISTICS parameter is true; 0 if false |
MAXIOWTM | NUMBER | Maximum time (in hundredths of a second) spent doing a single write, if theTIMED_STATISTICS parameter is true; 0 if false |
本视图记录各文件物理I/O信息。如果瓶颈与I/O相关,可用于分析发生的活动I/O事件。V$FILESTAT显示出数据库I/O的下列信息(不包括日志文件):
- 物理读写数
- 块读写数
- I/O读写总耗时
以上数值自实例启动即开始记录。如果获取了两个快照,那么二者之间的差异即是这一时间段内活动I/O统计。
V$FILESTAT中的常用列:
- FILE#:文件序号;
- PHYRDS:已完成的物理读次数;
- PHYBLKRD:块读取数;
- PHYWRTS:DBWR完成的物理写次数;
- PHYBLKWRT:写入磁盘的块数;
V$FILESTAT注意项:
因为multiblock读调用,物理读数和数据块读数有可能不同;
因为进程直写,物理写和数据块写也可能不一致;
Sum(physical blocks read) 近似于v$sysstat中的physical reads;
Sum(physical blocks written) 近似于v$sysstat中的physical writes;
数据读(由缓存读比直读好)由服务进程处理。从buffer cache写只能由DBWR进行,直写由服务进程处理。
select df.tablespace_name name,
df.file_name "file",
f.phyrds pyr,
f.phyblkrd pbr,
f.phywrts pyw,
f.phyblkwrt pbw
from v$filestat f, dba_data_files df where f.file# = df.file_id
order by df.tablespace_name;
SQL> select sum(PHYBLKWRT),sum( PHYWRTS ) from v$filestat;
SUM(PHYBLKWRT) SUM(PHYWRTS)
-------------- ------------
82020105 76972981
SQL> select name,value from v$sysstat where name like '%writes%' ;
NAME VALUE
---------------------------------------------------------------- ----------
physical writes 100817824
physical writes non checkpoint 78362383
DBWR transaction table writes 140236
DBWR undo block writes 21725210
DBWR cross instance writes 8
DBWR fusion writes 239173
remote instance undo block writes 8
remote instance undo header writes 0
redo synch writes 149037740
physical writes direct 24863310
physical writes direct (lob) 2003213
redo writes 147532422
12 rows selected.
v$filestat 中 :
sum(PHYBLKWRT),sum( PHYWRTS) 分别表示 DBWR 的写的 block 数和 写的次数,而 v$sysstat 中表示所有的写的 blocks 数,包括 server porcess的 direct writes 。当然事实上,我们查询下表也可以看出 v$filestat 中不包含 临时表空间
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23650854/viewspace-688875/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/23650854/viewspace-688875/