等待模拟-read by other session

表TEST是一个130M的表。

create or replace procedure test_buffer_read

is 

begin 

  for x in (select * from test) loop

    null;

  end loop;

end;

var job_no number;

begin 

  for idx in 1..20 loop

      dbms_job.submit(:job_no,'test_buffer_read;');

end loop;

commit;

end;

然后手动执行一次 execute test_buffer_read

select * from v$session_event a,(select SID from v$mystat where rownum
where a.SID=b.sid;

对于这样的,很可能会出现很多等待,

EVENT

----------------------------------------------------------------

latch: cache buffers chains

latch: cache buffers chains

latch: cache buffers chains

db file scattered read

read by other session

read by other session

db file sequential read

latch: cache buffers chains

read by other session

db file scattered read

read by other session

job scheduler coordinator slave wait

往往这些等待同时出现,需要知道他们是息息相关的

可以用如下语句查看,当前会话中的等待对象如果等待的是data block的话,但是速度很慢。。

    

    SELECT a.segment_name,b.wait_time,'LOG READ' FROM DBA_EXTENTS a,

    (select p1,p2,WAIT_TIME from v$session_wait where event in  ('read by other session','buffer busy waits') and p3=1) b

    where a.file_id=b.p1 and b.p2 between a.block_id and a.block_id+a.blocks-1

    union all

    SELECT a.segment_name,b.wait_time,'phy READ' FROM DBA_EXTENTS a,

    (select p1,p2,WAIT_TIME from v$session_wait where event in  ('db file scattered read','db file sequential read')) b

    where a.file_id=b.p1 and b.p2 between a.block_id and a.block_id+a.blocks-1

    order by wait_time; 

阅读(2116) | 评论(0) | 转发(0) |

0

上一篇:等待模拟-cache buffer chain

下一篇:ORACLE各个版本系统安装需求

时间: 2024-07-30 10:59:37

等待模拟-read by other session的相关文章

等待模拟-cache buffer chain

出现CACHE BUFFER CHAIN 后首先查看V$SESSION_WAIT 找到P1raw的值,此P1对应了v$latch_children addr和 x$bh 的HLADDR 然后查看v$latch_children 找到GET最高的LATCH ADDR  select * from v$latch_children where name='cache buffers chains' order by gets desc;  select * from v$latch_children

等待模拟-library cache 软解析

create table test (it int); insert into test values(10); commit; create or replace procedure do_soft_parse(p_idx in number)  is      v_value number;     v_cursor sys_refcursor;  begin     execute immediate 'alter session set session_cached_cursor=0';

等待模拟-library cache shared pool 硬解析

drop table test1; create table test1 (it int); insert into test1 values(10); create table test2 as select * from test1; create table test3 as select * from test1; create table test4 as select * from test1; create table test5 as select * from test1; c

C# 模拟网站登录(session)

问题描述 模拟成功了,但是登录后,跳转到另一个页面,无session所以提示未登录,求帮助!登录地址:http://eo.gyyx.cn/Page/User/Login.aspx代码如下://提交按钮的文本stringuser=TextBox1.Text;stringpass=TextBox2.Text;stringsubmitButton="登录";//页面的VeiwState(可以通过IE打开页面,右键"查看源文件"取得)stringviewState=&quo

关于等待事件"read by other session"

在查看数据库负载的时候,发现早上10点开始到12点的这两个钟头,系统负载异常的高.于是抓取了一个awr报告. Snap Id Snap Time Sessions Cursors/Session Begin Snap: 24027 18-Dec-14 10:00:43 3065 6.6 End Snap: 24033 18-Dec-14 11:00:48 3441 6.5 Elapsed:   60.08 (mins)     DB Time:   3,650.67 (mins)     可以从

等待模拟-BUFFER BUSY WAIT

create table test_buf(id number,name char(1000)) tablespace test; begin   for idx in 1..100 loop  insert into test_buf values(idx,'aa');  end loop; end; select dbms_rowid.rowid_relative_fno(rowid),dbms_rowid.rowid_block_number(rowid),count(*) from te

kill等待session的方法 - 引申自恩墨面试题的一些思考

Kamus曾在微信公众号发表了一篇文章<删繁就简 - 云和恩墨的一道面试题解析>,恩墨的新书<Oracle性能优化与诊断案例精选>第五章引用了相同的文章,来自恩墨的一道面试题,乍一看其中涉及的知识点,大部分比较眼熟,但开始解决的时候,能否清晰地完成,就因人而异了. 从我的认识来看,对于日常的工作,有一些值得总结和借鉴的,因此写出来分享一下,欢迎各位提出其他的建议,共同完善. 一.原文描述 题目是:请将 emp.empno=7369 的记录 ename 字段修改为"ENMO

Oracle常见的等待事件

db file scattered read 对于一些频繁访问的表,如果没有建立索引或没有建立 合适的索引,Oracle只能对其进行全表扫描,就会导致大量该等待事件. 全表扫描时,读 取的数据在磁盘上一般是连续的,但是读到内存时却是不连续的,因此该事件命名为离散读 (scattered read),注意不要被它的名字所迷惑. 一次多块读取的数量受参数 DB_FILE_MULTIBLOCK_READ_COUNT的影响. 在实际诊断过程中,可以通过v$session_wait 视图发现session

ORACLE等待事件:SQL*Net message from client &amp; SQL*Net message to client

在ORACLE当中有两个很常见的等待事件"SQL*Net message from client"与"SQL*Net message to client",两者有点区别,下面整理这方面的资料如下:     SQL*Net message from client      表示服务端等待着Cilent发来请求让它处理,这时就会产生SQL*Net message from client等待事件.                                 而我们把这