前言:传统的数据库读取的方式是先在内存中搜索,如果搜索不到数据,那么就在把数据从磁盘读到内存中,然后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管理 )

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

oracle直接路径读,direct path read直接路径读相关推荐

  1. Oracle 11g新特性direct path read引发的系统停运故障诊断处理

    Oracle 11g新特性direct path read引发的系统停运故障诊断处理 黎俊杰 | 2016-07-28 14:37 声明:部分表名为了脱敏而用XX代替 1.故障现象 (1)一个业务系统 ...

  2. ORACLE等待事件:direct path write

    2015年4月27日,晚上6点左右,电渠3g2库ORACLE RAC系统节点1出现大量的direct path write等待事件,导致大量的会话堆积,节点1几乎无法使用,应用受到影响,相关处理流程如 ...

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

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

  4. 【Oracle】11g direct path read介绍:10949 event、_small_table_threshold与_serial_direct_read

    转自刘相兵老师的博文: http://www.askmaclean.com/archives/11g-direct-path-read-10949-_small_table_threshold-_se ...

  5. 11g direct path read介绍:10949 event、_small_table_threshold与_serial_direct_read

    在11g之前串行的扫描大表默认总是先将数据读取到Oracle高速缓冲中,其等待事件常为db file scattered read.   从11g开始Oracle通过内部算法来决定串行扫描大表是通过直 ...

  6. oracle direct path read temp,direct path read/read temp等待事件

    当会话从磁盘直接读取数据块到PGA(绕过SGA)时,发生direct path read/read temp等待事件 ,下图简要描述了这种方式的读取方式: 如果I/O子系统不支持异步I/Os,那么每个 ...

  7. oracle direct path read temp,Oracle中的direct path read事件(转)

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

  8. oracle中创建事件的作用,Oracle常见等待事件说明(二)-direct path read/write

    与直接读取相关联的等待事件.当ORACLE将数据块直接读入会话的PGA(进程全局区)中,同时绕过SGA(系统全局区).PGA中的数据并不和其他的会话共享.即表明,读入的这部分数据该会话独自使用,不放于 ...

  9. ORACLE 索引并行引起的direct path read temp和latch free等待导致进程数超过最大数

    2016年10月27日下午,测试同事说测试数据库连接不上了,让我们DBA查看问题并解决一下.    操作系统:Red Hat Enterprise Linux Server release 6.6 ( ...

最新文章

  1. android设置光标闪烁,Android EditText闪烁光标
  2. Android的NDK开发(3)————JNI数据类型的详解
  3. js 在新窗口中打开URL
  4. 在创业公司工作是一种什么样的体验?
  5. 架构设计 | 异步处理流程,多种实现模式详解
  6. 关于android LinearLayout的比例布局(转载)
  7. 中国5G务实发展 向大规模商用推进
  8. 漂亮的thinkphp 跳转页封装
  9. 实验过程中收获的经验、教训、感想
  10. 备份手机相册----syncthing (一劳永逸式解决方案)
  11. git checkout -b
  12. python生成可执行文强案文件
  13. wp兼容了android应用程序,WP比安卓流畅 但为什么就不好用呢?
  14. 金融量化?金融市场?股票? 来,告诉你这些都是什么
  15. 响铃:“头号玩家”乐车邦,恰恰踩到了“无人”的点上
  16. js查找数组中符合条件的元素
  17. nz-select使用所出现的坑
  18. 最新国家级贫困县名单
  19. Mysql - 百万级数据查询优化笔记 (PHP Script) ②
  20. 贼好用的自动化测试工具:Apipost!

热门文章

  1. 小米路由器LuCI Web服务
  2. 量化金融分析AQF(1):股票概述
  3. Windows获取模块基地址
  4. 一个优秀的团队的重要性
  5. 如何对CAD图纸上的图形进行单独保存起来
  6. 大数据清洗2(元素操作)
  7. win10 安装docker msi主板开启虚拟化
  8. AndroidStudio 高频使用快捷键及使用技巧(gif图)
  9. Codeforces 513F1 513F2 Scaygerboss 网络流
  10. trove mysql 镜像_OpenStack(Queens)制作 Trove 镜像