ITPub博客

首页 > 应用开发 > IT综合 > read by other session等待事件模拟

read by other session等待事件模拟

原创 IT综合 作者:warehouse 时间:2009-11-21 20:02:09 0 删除 编辑

This event occurs when a session requests a buffer that is currently being read into the buffer cache
by another session. Prior to release 10.1, waits for this event were grouped with the other reasons for
waiting for buffers under the 'buffer busy wait' event

客户系统最近这个事件表现的比较突出,简单的模拟了一下,这是一个和io相关的读等待事件,因此它也伴随着db file sequential read和db file sequential read一起出现

[@more@]

session 1:
SQL> select distinct sid from v$mystat;

SID
----------
159
SQL> declare
2 i number :=0;
3 v_string varchar2(50) :='alter system flush buffer_cache';
4 begin
5 loop
6 select count(*) into i from tt;
7 execute immediate v_string;
8 end loop;
9 end;
10 /

--==========================
session 2:
SQL> select distinct sid from v$mystat;

SID
----------
144

SQL> declare
2 i number :=0;
3 v_string varchar2(50) :='alter system flush buffer_cache';
4 begin
5 loop
6 select count(*) into i from tt;
7 execute immediate v_string;
8 end loop;
9 end;
10 /

--=========================
session 3:
SQL> select distinct sid from v$mystat;

SID
----------
142

SQL> declare
2 i number :=0;
3 v_string varchar2(50) :='alter system flush buffer_cache';
4 begin
5 loop
6 select count(*) into i from tt;
7 execute immediate v_string;
8 end loop;
9 end;
10 /

--===========================
session 4:(监控)
SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 read by other session file# block# class# User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file sequential read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 read by other session file# block# class# User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 read by other session file# block# class# User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file sequential read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 read by other session file# block# class# User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 read by other session file# block# class# User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 read by other session file# block# class# User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 read by other session file# block# class# User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL> select sid,event,p1text,p2text,p3text,wait_class from v$session_wait where
sid in (159,144,142);

SID EVENT P1TEXT P2TEXT P3TEXT WAIT_CLASS

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

142 db file scattered read file# block# blocks User I/O
144 db file scattered read file# block# blocks User I/O
159 db file scattered read file# block# blocks User I/O

SQL>

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/19602/viewspace-1028929/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-07

  • 博文量
    717
  • 访问量
    5098441