direct path read直接路径读

http://blog.itpub.net/12679300/viewspace-1188072/
原创 Oracle 作者:wzq609 时间:2014-06-18 14:24:12  3034  0

前言:传统的数据库读取的方式是先在内存中搜索,如果搜索不到数据,那么就在把数据从磁盘读到内存中,然后PGA再中SGA中获取数据,这样数据就缓存到内存中了,下次再次访问的时候,就可以直接从SGA中获取,不用再进行物理读;

direct path read(直接路径读):直接路径读是违反传统的数据读取方式的,指服务器进程直接读取数据文件到PGA的内存,不经过buffer cache,以下是数据库读取数据的三种方式;

官方说明介绍:When a session is reading buffers from disk directly into the PGA (opposed to the buffer cache in SGA), it waits on this event. If the I/O subsystem does not support asynchronous I/Os, then each wait corresponds to a physical read request.

If the I/O subsystem supports asynchronous I/O, then the process is able to overlap issuing read requests with processing the blocks existing in the PGA. When the process attempts to access a block in the PGA that has not yet been read from disk, it then issues a wait call and updates the statistics for this event. Hence, the number of waits is not necessarily the same as the number of read requests (unlike db file scattered read and db file sequential read).

Check the following V$SESSION_WAIT parameter columns:

?P1: File_id for the read call

?P2: Start block_id for the read call

?P3: Number of blocks in the read call

直接路径读的优势:存在即合理,相信这个算法的产生也肯定是有原因的;

总结优势如下:

1、采用直接路径读取后,总能保证读取的块数是多块读参数设置的大小,提高了读取的效率;

2、大大的降低了对于latch的使用,进而避免了可能导致的latch竞争(cbc latch等);

3、降低了全表扫描对buffer cache的冲击;

4、降低了buffer pin的开销,有可能降低buffer busy waits等相关等待;

当然这种方法也是有副作用的:

1、会发生段一级的检查点(后面详细介绍),因此在查询真正开始执行前,会做这个额外的准备工作。而且可能会造成IO抖动,因为要写脏数据;

2、如果你的表需要频繁的全表扫描读取,还是用传统的读取方式比较好;

3、在MOS中搜索direct path read,会发现它可能会导致多次的延迟块清除;

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

本文作者:JOHN

ORACLE技术博客:ORACLE 猎人笔记               数据库技术群:367875324 (请备注ORACLE管理 )

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12679300/viewspace-1188072/,如需转载,请注明出处,否则将追究法律责任。

[转帖]direct path read直接路径读的更多相关文章

  1. oracle 11g禁用和强制direct path read

    一般在混合型环境中,大表在进行全表扫描或者走并行的时候一般会出现direct path read等待事件,如果在OLTP或者纯粹的DSS环境中,出现大量的direct path read直接路径读取, ...

  2. Oracle 数据库禁止全表访问的时候direct path read /////

    一般在OLAP环境中,大表在进行全表扫描的时候一般会出现direct path read等待事件,如果在OLTP环境中,出现大量的direct path read直接路径读取,这样就有问题了.一般在O ...

  3. direct path read/write (直接路径读/写)

    转载:http://www.dbtan.com/2010/04/direct-path-readwrite.html direct path read/write (直接路径读/写): 直接路径读(d ...

  4. direct path read

    在11g中,全表扫描可能使用direct path read方式,绕过buffer cache,这样的全表扫描就是物理读了. 在10g中,都是通过gc buffer来读的,所以不存在direct pa ...

  5. 深入解析direct path read (转)

    文章转自:http://www.itpub.net/thread-1815281-1-1.html 传统读取数据的方式是服务器进程通过读取磁盘,然后把数据加载到共享内存中,这样后面的进程就可以通过共享 ...

  6. Oracle 直接路径读

    在11g中,全表扫描可能使用direct path read方式,绕过buffer cache,这样的全表扫描就是物理读了. 在10g中,都是通过gc buffer来读的,所以不存在direct pa ...

  7. Oracle 11g全表扫描以Direct Path Read方式执行

    在Oracle Database 11g中有一个新特性,全表扫描可以通过直接路径读的方式来执行(Direct Path Read),这是一个合理的变化,如果全表扫描的大量数据读取是偶发性的,则直接路径 ...

  8. 11g直接路径读、相关参数、10949事件介绍

    转载自刘向兵老师:http://www.askmaclean.com/archives/11g-direct-path-read-10949-_small_table_threshold-_seria ...

  9. oracle等待事件-direct path read/write

    转://http://blog.chinaunix.net/uid-23177306-id-2531235.html 一.direct path read1.与直接读取相关联的等待事件.当ORACLE ...

随机推荐

  1. Robotframework ride ,运行后提示, [WinError 2] 系统找不到指定的文件。

    运行后提示, [WinError 2] 系统找不到指定的文件. command: pybot.bat --argumentfile C:\Users\123\AppData\Local\Temp\RI ...

  2. 在centos下安装rar解压.rar压缩包

    CentOS本身不自带rar环境,因此对于rar文件无法直接解压,需要先配置rar环境. 首先需要确定自己的系统是64位还是32位的,通过这个命令: [root@localhost]# uname - ...

  3. css实现保持div的等宽高比

    这篇文章主要为回答这个问题:“做响应式网页,如何让一个div的高和宽保持比例放大或是缩小?”,这里不介绍媒体查询的实现. 那么css如何实现高度height随宽度width变化保持比例不变呢?即给定可 ...

  4. ObjC: 委托模式

    转自:http://marshal.easymorse.com/tech/objc-%e5%a7%94%e6%89%98%e6%a8%a1%e5%bc%8f 在ObjC中,经常提到委托模式(deleg ...

  5. 源码升级SUSE openssh

    1.check old opensslrpm -q opensslopenssl versionwhich opensslwhereis opensslls /etc/ssl 2.backup old ...

  6. terminator

    terminator 能够实现linux 终端的分屏显示. 安装 sudo add-apt-repository ppa:gnome-terminator sudoapt-get update sud ...

  7. LengthFieldBasedFrameDecoder

    LengthFieldBasedFrameDecoder 详解 疯狂创客圈 Java 分布式聊天室[ 亿级流量]实战系列之 -31[ 博客园 总入口 ] 文章目录 LengthFieldBasedFr ...

  8. 绘制指引线的JS库leader-line

    前言 之前看到一篇推荐Magi这个搜索引擎的新闻,对于这个搜索引擎是否好用咱们不予置评,但是我在这个搜索引擎上面发现了一个好玩的前端功能. 如上图,将鼠标浮动到学习来源上时,会展示一堆指引线. 本博客 ...

  9. wordcloud词云模块

    wordcloud词云模块 下载 pip install wordcloud 使用 import wordcloud##调用整个模块 form wordcloud import WordCloud## ...

  10. input 关键字提示,对于一些特定优化来说,很有用处

    只用html就可以做出提醒操作:效果如下图 这里是代码,怎么样,很简单吧 <form action="/server" method="post"> ...