Oracle Metric direct path read

 

Oracle Metric direct path read

Oracle Tips by Burleson Consulting

 

The direct path read Oracle metric occurs during Direct Path operations when the data is asynchronously read from the database files into the PGA instead of into the SGA data buffer.  Direct reads occur under these conditions:

  • When reading from the TEMP tablespace (a sort operation)

  •  When reading a parallel full-table scan (parallel query factotum (slave) processes)

  •  Reading a LOB segment

Note:  The behavior of direct path reads changed in Oracle 11g release 2.  Before 11gr2, full table scan access path read all the blocks within a table (or a index fast full scan) into the buffer cache unless either the "_serial_direct_read" hidden parameter is set to "true" or the table/index has default parallelism set.  In sum, in 11g release 2 and beyond, Oracle will automatically decide whether to use direct path reads (thereby bypassing he buffer cache) with full table scans.

The hidden parameter "_small_table_threshold" defines the number of blocks to consider a table as being "small".   Any table having more than 5 times the number of blocks in "_small_table_threshold" (if you leave it at default value) will automatically use direct path reads for serial full table scans (FTS).

At some stage the session needs to make sure that all outstanding asynchronous I/O have been completed to disk. This can also happen if during a direct read no more slots are available to store outstanding load requests (a load request could consist of multiple I/Os).

The popular Ion tool is the easiest way to analyze Oracle direct path reads and writes, and Ion allows you to spot hidden disk I/O performance trends.  Ion is our favorite Oracle tuning tool, and the only 3rd party tool that we use. 

You see direct path read waits only when you are doing a parallel full-scan.  Unplanned direct path reads commonly happen when you turn on parallelism on at the system or session level:

alter table xxx parallel degree 32;

By specifying a table or index with the parallel option, the SQL optimizer thinks that a parallel full scan will be cheaper than a index range scan.  In these cases you will see lots of direct path reads.

When Oracle performs a parallel full-table scan, the database blocks are read directly into the program global area (PGA), bypassing the data buffer RAM:


Direct path reads are parallel full-table scans


[http://dba-oracle.com/include_tuning_book3.htm]

参考:

http://www.dba-oracle.com/m_direct_path_read.htm

《PGA_AGGREGATE_TARGET参数的理解》


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值