Oracle V$FILESTAT

 

原文链接

V$FILESTAT

This 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.

ColumnDatatypeDescription
FILE#NUMBERNumber of the file
PHYRDSNUMBERNumber of physical reads done
PHYWRTSNUMBERNumber of times DBWR is required to write
PHYBLKRDNUMBERNumber of physical blocks read
PHYBLKWRTNUMBERNumber of blocks written to disk, which may be the same as PHYWRTS if all writes are single blocks
SINGLEBLKRDSNUMBERNumber of single block reads
READTIMNUMBERTime (in hundredths of a second) spent doing reads if the TIMED_STATISTICS parameter istrue0 if false
WRITETIMNUMBERTime (in hundredths of a second) spent doing writes if the TIMED_STATISTICS parameter istrue0 if false
SINGLEBLKRDTIMNUMBERCumulative single block read time (in hundredths of a second)
AVGIOTIMNUMBERAverage time (in hundredths of a second) spent on I/O, if the TIMED_STATISTICS parameter is true0 if false
LSTIOTIMNUMBERTime (in hundredths of a second) spent doing the last I/O, if the TIMED_STATISTICSparameter is true0 if false
MINIOTIMNUMBERMinimum time (in hundredths of a second) spent on a single I/O, if the TIMED_STATISTICSparameter is true0 if false
MAXIORTMNUMBERMaximum time (in hundredths of a second) spent doing a single read, if theTIMED_STATISTICS parameter is true0 if false
MAXIOWTMNUMBERMaximum time (in hundredths of a second) spent doing a single write, if theTIMED_STATISTICS parameter is true0 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/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值