db file sequential read等待事件的一点研究
db file sequential read等待事件有3个参数:file#,first block#,和block数量。
这个等待事件有3个参数P1,P2,P3, 其中P1代表Oracle要读取的文件的绝对文件号, P2代表Oracle从这个文件中开始读取的起始数据块号, P3代表读取的BLOCK数量,通常这个值为1,表明是道单个BLOCK被读取。 SQL> select SESSION_ID,NAME,P1,P2,P3,WAIT_TIME,CURRENT_OBJ#,CURRENT_FILE#,CURRENT_BLOCK#
from v$active_session_history ash, v$event_name enm
where ash.event#=enm.event#
and SESSION_ID=39; 2 3 4 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
39 db file sequential read 4 531505 1 0 77088 4 531505
39 db file sequential read 4 528344 1 0 77088 4 528344
39 db file sequential read 4 520464 1 0 77088 4 520464
39 db file sequential read 4 517219 1 0 77088 4 517219
39 db file sequential read 4 502844 1 0 77088 4 502844
39 db file sequential read 4 489070 1 0 77088 4 489070
39 db file sequential read 4 480568 1 0 77088 4 480568
39 db file sequential read 4 478611 1 0 77088 4 478611
39 db file sequential read 4 473972 1 0 77088 4 473972
39 db file sequential read 4 473407 1 0 77088 4 473407
39 db file sequential read 4 458534 1 0 77088 4 458534 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
39 db file sequential read 4 458186 1 0 77088 4 458186
39 db file sequential read 4 457625 1 0 77088 4 457625
39 db file sequential read 4 457150 1 0 77088 4 457150
39 db file sequential read 4 452548 1 0 77088 4 452548
39 direct path read 4 440464 8 0 78043 4 440424
39 direct path read 4 430640 8 0 78043 4 430632
39 direct path read 4 425312 8 0 78043 4 425304
39 direct path read 4 421408 8 0 78043 4 421400
39 direct path read 4 416384 8 0 78043 4 416376
39 direct path read 4 410928 8 0 78043 4 410920
39 direct path read 4 406240 8 0 78043 4 406232 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
39 direct path read 4 404944 8 0 78043 4 404936
39 direct path read 4 399648 8 0 78043 4 399640
39 direct path read 4 394544 8 0 78043 4 394536
39 direct path read 4 389344 8 0 78043 4 389336
39 direct path read 4 383936 8 0 78043 4 383928
39 direct path read 4 379280 8 0 78043 4 379272
39 direct path read 4 374288 8 0 78043 4 374280
39 direct path read 4 369504 8 0 78043 4 369496
39 direct path read 4 364144 8 0 78043 4 364136
39 direct path read 4 359120 8 0 78043 4 359112
39 direct path read 4 354192 8 0 78043 4 354184 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
39 direct path read 4 350192 8 0 78043 4 350184
39 direct path read 4 346832 8 0 78043 4 346824
39 direct path read 4 341936 8 0 78043 4 341928
39 direct path read 4 337088 8 0 78043 4 337080
39 direct path read 4 331632 8 0 78043 4 331624
39 direct path read 4 327056 8 0 78043 4 327048
39 direct path read 4 321984 8 0 78043 4 321976
39 direct path read 4 316784 8 0 78043 4 316776
39 direct path read 4 311680 8 0 78043 4 311672
39 direct path read 4 306448 8 0 78043 4 306440
39 direct path read 4 301200 8 0 78043 4 301192 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
39 direct path read 4 295688 8 0 78043 4 295680
39 direct path read 4 290600 8 0 78043 4 290592
39 direct path read 4 286744 8 0 78043 4 286736
39 direct path read 4 281464 8 0 78043 4 281456
39 direct path read 4 276136 8 0 78043 4 276128
39 direct path read 4 271064 8 0 78043 4 271056
39 direct path read 4 266136 8 0 78043 4 266128
39 direct path read 4 261160 8 0 78043 4 261152
39 direct path read 4 256200 8 0 78043 4 256192
39 direct path read 4 255000 8 0 78043 4 254992
39 direct path read 4 254824 8 0 78043 4 254816 发现很多都是 db file sequential read等待事件 SQL> select owner,object_name,object_type from dba_objects where object_id=77088; OWNER OBJECT_NAM OBJECT_TYPE
---------- ---------- -------------------
SCOTT T1 TABLE BLOCK_ID: extent的起始块 BLOCKS:extent块的数量 SQL> select owner,segment_name,segment_type from dba_extents
where file_id = 4 and 531505 between block_id and block_id+blocks-1; 2 OWNER SEGMENT_NA SEGMENT_TYPE
---------- ---------- ------------------
SCOTT T1 TABLE 这里是回表造成的单块读 模拟下索引上的单块读,模拟index full scan SQL_ID 0r8t4zj3urrnp, child number 0
-------------------------------------
select id from t1 where t1.id is not null order by id Plan hash value: 2463307338 ----------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
----------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 42364 (100)| |
|* 1 | INDEX FULL SCAN | ID_IDX1 | 20M| 248M| 42364 (1)| 00:08:29 |
---------------------------------------------------------------------------- Predicate Information (identified by operation id):
--------------------------------------------------- 1 - filter("T1"."ID" IS NOT NULL) Note
-----
- dynamic sampling used for this statement (level=2) SQL> col name format a30
SQL> select SESSION_ID,NAME,P1,P2,P3,WAIT_TIME,CURRENT_OBJ#,CURRENT_FILE#,CURRENT_BLOCK#
from v$active_session_history ash, v$event_name enm
where ash.event#=enm.event#
and SESSION_ID=24; 2 3 4 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
24 db file sequential read 4 589800 1 0 78139 4 589800
24 db file sequential read 4 483506 1 0 77088 4 483506
24 db file sequential read 4 447172 1 0 77088 4 447172
24 db file sequential read 4 469775 1 0 77088 4 469775
24 db file sequential read 4 458597 1 0 77088 4 458597
24 db file scattered read 4 446041 7 0 77088 4 446044
24 db file scattered read 4 525865 8 0 77088 4 8714
24 db file sequential read 4 8714 1 0 -1 4 8714
24 db file sequential read 1 64155 1 0 40 1 64155
24 db file sequential read 1 11540 1 0 40 1 11540
24 db file sequential read 1 19442 1 0 62 1 19442 SESSION_ID NAME P1 P2 P3 WAIT_TIME CURRENT_OBJ# CURRENT_FILE# CURRENT_BLOCK#
---------- ------------------------------ ---------- ---------- ---------- ---------- ------------ ------------- --------------
24 db file scattered read 1 46040 8 0 68 1 46040
24 db file sequential read 1 172 1 0 -1 0 0
24 db file sequential read 1 21910 1 0 -1 0 0
24 db file scattered read 1 83984 8 0 -1 0 0
24 db file sequential read 1 64354 1 0 -1 0 0
24 db file sequential read 1 64335 1 0 -1 0 0
24 db file scattered read 1 70152 3 0 -1 0 0
24 db file scattered read 1 55196 5 0 -1 0 0
24 db file scattered read 1 5376 8 0 -1 0 0
24 db file sequential read 1 2867 1 0 -1 0 0 21 rows selected. select owner,segment_name,segment_type from dba_extents
where file_id = 4 and 589800 between block_id and block_id+blocks-1; SQL> 2 OWNER SEGMENT_NAME SEGMENT_TYPE
------------------------------ --------------------------------------------------------------------------------- ------------------
SCOTT ID_IDX1 INDEXdb file sequential read等待事件的一点研究的更多相关文章
- oracle之 db file sequential read等待事件优化思想
为什么db file sequential read事件在full table scan操作中显现,为什么在多块读中为什么会有单块读存在 ? extent的大小 :当扩展区中的最后一组块仅是1个块,o ...
- 何时会发生db file sequential read等待事件?
很多网友对系统内频繁发生的db file sequential read等待事件存有疑问,那么到底在那些场景中会触发该单块读等待事件呢? 在我之前写的一篇博文<SQL调优:Clustering ...
- db file sequential read等待事件 --转载
db file sequential read db file sequential read等待事件有3个参数:file#,first block#,和block数量.在10g中,这等待事件受到用户 ...
- db file scattered read 等待事件
db file scattered read 等待事件: 我们经常会见到db file scattered read 等待事件,在生产环境中,这个等待事件可能更为常见.这个事件表明用户进程正在读数据 ...
- [20180316]理解db file parallel read等待事件.txt
[20180316]理解db file parallel read等待事件.txt --//一直对db file parallel read等待事件不理解,因为在实际系统中很少遇到这样的等待事件. S ...
- control file sequential read 等待事件
可能的原因 control file sequential read Reading from the control file. This happens in many cases. For ex ...
- Oracle 等待事件 db file sequential read
db file sequential read-数据文件顺序读取 等待事件: "db file sequential read" Reference Note (文档 ID 345 ...
- 全表扫描引发的db file sequential read
今天我要做一个SQL调优,监控该SQL, 利用ASH 监控 该SQL是在sid=4848 上面跑的 db file sequential read等待事件有3个参数:file#,first block ...
- 记一次insert因为db file sequential read影响性能导致性能原因的分析
通过详细的10046 trace发现,大量的io等待分布在以下数据文件上:Misses in library cache during parse: 0Elapsed times include wa ...
随机推荐
- [转载]Android利用convertView优化ListView性能
本的getView写法 Java代码public View getView(int position, View convertView, ViewGroup parent) {View view = ...
- Web日程管理FullCalendar
fullcalendar是一款jQuery日程管理控件,提供了丰富的属性设置和方法调用,官网下载地址http://fullcalendar.io/download,眼下最新版本号是2.3.2. 仅仅要 ...
- Java基础知识强化之集合框架笔记11:Collection集合之迭代器的原理及源码解析
1. 迭代器为什么不定义成一个类,而是定义为一个接口 ? 答:假设迭代器定义的是一个类,这样我们就可以创建该类的对象,调用该类的方法来实现集合的遍历.但是呢? 我们想想,Java中提供了很多的集合类 ...
- Codeforces 190E - Counter Attack
[题意]给一个无向图的反图(即给定的边实际上不存在,而未给的边是存在的),求连通块数.(点数n<=5*10^5,边数m<=10^6) 一开始我想的用DFS,枚举每一个点,跳过不存在的点,直 ...
- 【开源java游戏框架libgdx专题】-11-核心库-演员类
演员类,又称为Actor类,是libgdx开发中最基本的元素,可以被继承. 演员类,从OpenGL类的角度来理解,可以称为一个二维场景节点.它本身具有位置(postion).边界矩形(类似Retang ...
- asp.net微信开发第五篇----用户分组管理
上一篇已讲解到新建用户分组,移动用户到分组的功能,这一章主要讲解修改分组名称和删除分组 开发者可以使用接口,对公众平台的分组进行查询.创建.修改.删除等操作,也可以使用接口在需要时移动用户到某个分组. ...
- asp.net中过滤器的两种写法
1.写在一个单独的类库中在web.config中进行配置 <httpModules> <add name="" type="类的全名称,程序集的名称&q ...
- SQL DMO のDMV
这两天对公司的一个项目进行优化,看着长长的SQL,脑袋不经有些大,一时间竟然不知道如何下手,一顿手忙脚乱后,小有成效,响应速度快了不少,同样的条件下可以做到秒级响应.闲暇时间想了想,还是得做点功课,最 ...
- Linux命令行下svn ignore忽略文件或文件夹用法
一.忽略单个目录 1.忽略文件夹 假如目录oa.youxi.com是从svn checkout出来的,在服务器本地目录添加了material,但是不希望把material加入版本控制,因此我们需要忽略 ...
- oracle解析xml完成版第二次修改
其实XML字符串就好像是ORACLE中的外部表,因此Oracle对 解析XML字符串一些规则要求非常严格.XML字符串提供的数据就是一张表,所以Oracle必须提供跟 xml数据一致的列头 示例一 S ...