[转帖]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 ...
随机推荐
- windows设置多个JDK环境
1.查看jdk版本 java -version 2.查看JAVA_HOME和PATH的变量值 echo %JAVA_HOME% set path 3.临时修改环境变量JAVA_HOME和PATH的变量 ...
- 0x03 Python logging模块之Formatter格式
目录 logging模块之Formatter格式 Formater对象 日志输出格式化字符串 LogRecoder对象 时间格式化字符串 logging模块之Formatter格式 在记录日志是,日志 ...
- VirtualBox打开VMware虚拟机
下载安装VirtualBox 打开VirtualBox,选择新建 设置如下: 之后就可以直接打开虚拟机了.
- Linux IO 概念(2)
在上一篇IO底层的概念中杂合了很多模糊的概念,受知识水平的限制,只是从网上抄了很多过来.从linux一切皆文件的设计哲学,介绍了文件描述符,从进程的运行内存分配,进程的切换,介绍了进程的阻塞,以及引出 ...
- mybatis-plus手记
项目源码:https://gitee.com/baomidou/mybatis-plus https://github.com/baomidou/mybatis-plus 文档:https:/ ...
- MongoDB基础知识与常用命令
SQL术语/概念 MongoDB术语/概念 解释/说明 database database 数据库 table collection 数据库表/集合 row document 数据记录行/文档 col ...
- stm32定时器频率采样的方式
频率采样方法通常采样定时器的计数方法,在stm32中,输入捕捉模式,PWM输入模式,都是可以测试外部信号频率采样的.1.输入捕捉模式需要频繁的进中断,这个方式不太好的.如果一定要用,那么就软件上处理一 ...
- 小学四则运算口算练习app---No.2
经过昨天的了解,虽然还是很懵,总要下手摸到鼠标来写第一个页面! 这是一开始设置出体数目和时间的页面,使用者根据提示进行相关设置即可! 代码如下: <?xml version="1.0& ...
- plv8 rpm包创建
以下是从一个三方rpm构建,获取到的rpm 包制作spec,主要是学习下pg 扩展rpm 包的打包 rpm src 包 下载地址 https://fedora.pkgs.org/29/fedora-x ...
- MySQL 五大引擎之间的区别和优劣之分
MySQL五大引擎介绍: MYSQL支持三个引擎:ISAM.MYISAM和HEAP.另外两种类型INNODB和BERKLEY(BDB) ISAM:ISAM是一个定义明确且历经时间考验的数据表格管理方 ...