[转帖]direct path read直接路径读
direct path read直接路径读
http://blog.itpub.net/12679300/viewspace-1188072/
前言:传统的数据库读取的方式是先在内存中搜索,如果搜索不到数据,那么就在把数据从磁盘读到内存中,然后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直接路径读的更多相关文章
- oracle 11g禁用和强制direct path read
一般在混合型环境中,大表在进行全表扫描或者走并行的时候一般会出现direct path read等待事件,如果在OLTP或者纯粹的DSS环境中,出现大量的direct path read直接路径读取, ...
- Oracle 数据库禁止全表访问的时候direct path read /////
一般在OLAP环境中,大表在进行全表扫描的时候一般会出现direct path read等待事件,如果在OLTP环境中,出现大量的direct path read直接路径读取,这样就有问题了.一般在O ...
- direct path read/write (直接路径读/写)
转载:http://www.dbtan.com/2010/04/direct-path-readwrite.html direct path read/write (直接路径读/写): 直接路径读(d ...
- direct path read
在11g中,全表扫描可能使用direct path read方式,绕过buffer cache,这样的全表扫描就是物理读了. 在10g中,都是通过gc buffer来读的,所以不存在direct pa ...
- 深入解析direct path read (转)
文章转自:http://www.itpub.net/thread-1815281-1-1.html 传统读取数据的方式是服务器进程通过读取磁盘,然后把数据加载到共享内存中,这样后面的进程就可以通过共享 ...
- Oracle 直接路径读
在11g中,全表扫描可能使用direct path read方式,绕过buffer cache,这样的全表扫描就是物理读了. 在10g中,都是通过gc buffer来读的,所以不存在direct pa ...
- Oracle 11g全表扫描以Direct Path Read方式执行
在Oracle Database 11g中有一个新特性,全表扫描可以通过直接路径读的方式来执行(Direct Path Read),这是一个合理的变化,如果全表扫描的大量数据读取是偶发性的,则直接路径 ...
- 11g直接路径读、相关参数、10949事件介绍
转载自刘向兵老师:http://www.askmaclean.com/archives/11g-direct-path-read-10949-_small_table_threshold-_seria ...
- oracle等待事件-direct path read/write
转://http://blog.chinaunix.net/uid-23177306-id-2531235.html 一.direct path read1.与直接读取相关联的等待事件.当ORACLE ...
随机推荐
- flink SourceFunction SinkFunction timeWindowAll reduce
1.实现SourceFunction接口生成数据源 /** * @Description: 产生数据 traceid,userid,timestamp,status,response time */ ...
- MEDICI仿真NMOS器件晶体管语法笔记
MEDICI仿真NMOS器件晶体管 TITLE TMA MEDICI Example 1 - 1.5 Micron N-Channel MOSFET 给本例子取的标题,对实际的模拟无用 COM ...
- 05. redis事务
目录 Redis 事务 事务 1. 命令有序 2. 始终原子 开启使用事务 Redis事务中出现错误 1. EXEC前的错误 2. EXEC后的错误 为什么出错了不支持roll backs? Redi ...
- spring项目使用mave将第三方jar包打进war包中
背景:一个标准的ssm项目,需要使用到第三方jar,现需要将项目发布到liunx的服务器上,将项目打成war包,第三方war包也需要打进去 首先是直接打包,发现第三方jar包并没有打进去......蛋 ...
- Linux虚拟机修改ip地址,查看网关,网络环境配置
修改虚拟机的ip地址: 进入如下界面,直接修改子网ip即可. 查看网关: Linux网络环境配置: 第一种方式(自动获取): 说明:登陆后,通过界面来设置自动获取ip 我们先进入设置: 把自动连接勾上 ...
- 汉诺塔问题深度剖析(python实现)
当我们学习一门编程语言的时候,都会遇到递归函数这个问题.而学习递归的一个经典案例就是汉诺塔问题.通过这篇文章,观察移动三个盘子和四个盘子的详细过程,您不仅可以深刻的了解递归,也更加熟悉了汉诺塔的游戏的 ...
- CSS伪类选择器:is、not
本文介绍一下Css伪类:is和:not,并解释一下is.not.matches.any之前的关系 :not The :not() CSS pseudo-class represents element ...
- JDOJ 2157 Increasing
洛谷 P3902 递增 洛谷传送门 JDOJ 2157: Increasing JDOJ传送门 Description 数列A1,A2,--,AN,修改最少的数字,使得数列严格单调递增. Input ...
- VIJOS-P1282 佳佳的魔法照片
洛谷 P1583 魔法照片 洛谷传送门 JDOJ 1396: VIJOS-P1282 佳佳的魔法照片 JDOJ传送门 Description 一共有n个人(以1--n编号)向佳佳要照片,而佳佳只能把照 ...
- Fish eating fruit 沈阳网络赛(树形dp)
Fish eating fruit \[ Time Limit: 1000 ms \quad Memory Limit: 262144 kB \] 题意 大体的题意就是给出一棵树,求每一对点之间的距离 ...