转 event 'utl_file I/O':
The ASH report shows tables and data files with wait event 'utl_file I/O':
CHANGES
No changes.
CAUSE
ASH reports retrieve data from the dba_hist_active_sess_history view. The information in that view is aggregated from what happened in between each sample from v$active_session_history, which means that it can potentially include multiple events (such as CPU and I/O events).
In the following example , code is executed that performs CPU and I/O operations in a short period of time:
alter system flush shared_pool;
connect system/manager
set time on
set timing on
set serveroutput on
declare
x number;
begin
dbms_output.enable(1000000);
for i in (select s.*,rownum r from dba_source s) loop
x:=dbms_utility.get_hash_value(i.name,1,163830000);
if mod(x,99)=0 then
dbms_output.put('+');
else
dbms_output.put('.');
end if;
if mod(i.r,30000)=0 then
dbms_output.put_line('*');
end if;
end loop;
end;
/
If we query v$active_session_history, we see:
column p1p2p3 format a20
select sample_id,NVL(event, 'CPU') AS event,p1||'-'||p2||'-'||p3 p1p2p3, TM_DELTA_CPU_TIME,TM_DELTA_DB_TIME,DELTA_READ_IO_REQUESTS
from v$active_session_history
where (session_id,SESSION_SERIAL#)=(select sid,serial# from v$session where sid=(select sid from v$mystat where rownum=1))
order by sample_id
/
SAMPLE_ID EVENT P1P2P3 TM_DELTA_CPU_TIME TM_DELTA_DB_TIME DELTA_READ_IO_REQUESTS
---------- ------------------------------ -------------------- ----------------- ---------------- ----------------------
125687 CPU 1-9720-8 141978 126117 311
125688 CPU 1-31856-16 1093833 1105182 142
125689 CPU 1-75808-16 100
125690 CPU 1-77248-16 2009695 2020332 66
125691 CPU 1-79952-16 64
Notice that all of the EVENTs listed are CPU events but the PL/SQL must have had to perform I/O. This I/O is reflected in DELTA_READ_IO_REQUESTS. By looking at the columns p1,p2,p3, it can be found some residual values from what probably was a 'db file scattered read' where p1 is file_no, p2 block_id , and p3 is blocks.
This is confirmed by looking up those blocks in the data dictionary.
SEGMENT_NAME
---------------------------------------------------------------------------------
SOURCE$
SQL> select segment_name from dba_extents where file_id =1 and 79952 between block_id and block_id+blocks;
SEGMENT_NAME
---------------------------------------------------------------------------------
SOURCE$
SOLUTION
This is expected behavior.
The wait event surfaces when a PL/SQL program is running SQLs and using UTL_FILE in close proximity. Multiple IOs to the DB and UTL_FILE calls were executed in fast succession and the p1p2p3 sampled were residual from DB IO events to the datafiles. The "utl_file I/O" event was included as part of the sample. So when the ASH report is generated, both the "utl_file I/O" event and the information of datafiles accessed are present.
转 event 'utl_file I/O':的更多相关文章
- 利用utl_file来读取文件.
以前写过用external table来加载trace文件,详情参考下面链接. http://www.cnblogs.com/princessd8251/p/3779145.html 今天要做到是用U ...
- 如何利用ETW(Event Tracing for Windows)记录日志
ETW是Event Tracing for Windows的简称,它是Windows提供的原生的事件跟踪日志系统.由于采用内核(Kernel)层面的缓冲和日志记录机制,所以ETW提供了一种非常高效的事 ...
- [.NET] C# 知识回顾 - Event 事件
C# 知识回顾 - Event 事件 [博主]反骨仔 [原文]http://www.cnblogs.com/liqingwen/p/6060297.html 序 昨天,通过<C# 知识回顾 - ...
- Atitit 解决Unhandled event loop exception错误的办法
Atitit 解决Unhandled event loop exception错误的办法 查看workspace/.metadata/.log org.eclipse.swt.SWTError: No ...
- Java模拟Windows的Event
场景 开发中遇到一个场景,业务操作会不定时的产生工作任务,这些工作任务需要放入到一个队列中,而另外会有一个线程一直检测这个队列,队列中有任务就从队列中取出并进行运算. 问题 业务场景倒是简单,只不过这 ...
- 事件EVENT与waitforsingleobject的使用
事件event与waitforsingleobject的配合使用,能够解决很多同步问题,也可以在数据达到某个状态时启动另一个线程的执行,如报警. event的几个函数: 1.CreateEvent和O ...
- 火狐浏览器中event不起作用解决办法--记录(一)
今天遇到了这个问题.IE,谷歌下都没问题,但在FF下却不起作用,很郁闷查了半天,看别人博文写了老长,结果试了要么起作用,但太麻烦,要么不起作用,说了那么多跟没说一样. 其实只要这一句代码就行:e=ar ...
- Event事件
妙味课堂-Event事件 1.焦点:当一个元素有焦点的时候,那么他就可以接受用户的输入(不是所有元素都能接受焦点) 给元素设置焦点的方式: 1.点击 2.tab 3.js 2.(例子:输入框提示文字) ...
- Event Sourcing Pattern 事件源模式
Use an append-only store to record the full series of events that describe actions taken on data in ...
随机推荐
- Android Studio 字体大小和背景色的设置
豆绿色的RGB值:#C7EDCC 1.打开Android Studio——>Ctrl+Alt+s 或者 File——>Settings 2.在弹窗中选中“Colors&Fonts” ...
- checkbox怎么判断是否选中
下面这种可以使用 if($("#checkbox1").is(':checked')) { alert("1"); } else { alert("0 ...
- BZOJ_2813_奇妙的Fibonacci_线性筛
BZOJ_2813_奇妙的Fibonacci_线性筛 Description Fibonacci数列是这样一个数列: F1 = 1, F2 = 1, F3 = 2 . . . Fi = Fi-1 + ...
- ACM学习历程—BestCoder 2015百度之星资格赛1001 大搬家(递推 && 组合数学)
Problem Description 近期B厂组织了一次大搬家,所有人都要按照指示换到指定的座位上.指示的内容是坐在位置i 上的人要搬到位置j 上.现在B厂有N 个人,一对一到N 个位置上.搬家之后 ...
- 【C++】*p++ = *p不同环境下操作不同
实测,Ubuntu16.04,gcc 5.3.0&5.4.0(编译选项选择C++11和不选择新标准结果相同) #include<iostream> using namespace ...
- BZOJ3938:Robot
浅谈标记永久化:https://www.cnblogs.com/AKMer/p/10137227.html 题目传送门:https://www.lydsy.com/JudgeOnline/proble ...
- matlab函数 bwperim
功能:查找二值图像的边缘. 用法: BW2 = bwperim(BW1) BW2 = bwperim(BW1,conn) BW2 = bwperim(BW1,conn)表示从输入图像BW1中返回只包括 ...
- 如何使用Git命令将项目从github或者服务器上克隆下来
在本地新建一个文件夹,作为本地仓库,如“demo”.单击右键git Bush here,打开git,输入命令: cd /c/Users/Administrator/Desktop/demo 然后按回 ...
- IOS深入学习
iOS超全开源框架.项目和学习资料汇总(1)UI篇 iOS超全开源框架.项目和学习资料汇总(2)动画篇 iOS超全开源框架.项目和学习资料汇总(3)网络和Model篇 数据库 FMDB – sqlit ...
- CentOS快速搭建LAMP环境
LAMP -- Linux Apache MySQL PHP 在CentOS安装的顺序,我一般是Apache -> MySQL -> PHP 第一步.安装并配置Apache 1.使用yu ...