read by other session.sql
2013-10-12 15:15
393 查看
Applies to:
Oracle Server - EnterpriseEdition - Version: 10.1.0.2 to 10.2.0.1
Information in this document applies to any platform.
Goal
What does "Read By Other Session" wait event mean ?Solution
When information is requested from the database, Oracle will first read the data from disk into the database buffer cache. If two or more sessions request the same information, the first session will read the data into the buffer cache while other sessionswait. In previous versions, this wait was classified under the "buffer busy waits" event. However, in Oracle 10.1 and higher, this wait time is now broken out into the "read by other session" wait event. Excessive waits for this event are typically due to
several processes repeatedly reading the same blocks, e.g. many sessions scanning the same index or performing full table scans on the same table. Tuning this issue is a matter of finding and eliminating this contention.
当请求一个数据时,如果buffer cache没有该数据时,Oracle会从磁盘将数据读入buffer cache。
如果有两个或者多个session 请求相同的信息,那么第一个session 会将这个信息读入buffer cache,其他的session 就会出现等待。
在10.1之前,该等待事件归类为bufferbusy waits,在Oracle 10.1之后,单独将该事件拿出并命令为read by other session。
一般来说出现这种等待事件是因为多个进程重复的读取相同的blocks,比如一些session 扫描相同的index或者在相同的block上执行full table scan。
解决这个等待事件最好是找到并优化相关的SQL语句。
read by other session 等待的出现也说明数据库存在热块问题,所以该等待事件通常会有db file sequential read或db file scattered read 同时出现。
When a session is waiting on this event, an entry will be seen in the v$session_wait system view giving more information on the blocks being waited for:
SELECT p1 "file#", p2 "block#", p3 "class#"
FROM v$session_wait
WHERE event = 'read by other session';
If information collected from the above query repeatedly shows that the same block (or range of blocks) is experiencing waits, this indicates a "hot" block or object.
The following query will give the name and type of the object:
SQL> SELECT relative_fno, owner, segment_name, segment_type
FROM dba_extents
WHERE file_id = &file
AND &block BETWEEN block_id AND block_id + blocks - 1
相关文章推荐
- gdb调试之--read by other session 等待事件的重现
- read by other session
- gdb调试之--read by other session 等待事件的重现
- buffer cache —— buffer busy waits/read by other session
- buffer cache —— buffer busy waits/read by other session
- read by other session
- Read by other session 等待说明
- 一次 read by other session 的处理过程--数据走索引需要看索引字段的数据分布情况
- “read by other session”等待事件引发的数据库性能问题
- read by other session
- read by other session 等待事件。
- read by other session等待事件
- 10g wait event: read by other session
- WAITEVENT: "read by other session" Reference Note (Doc ID 732891.1)
- 等待事件:read by other session
- 系统遇到read by other session等待事件
- select/select 引起的read by other session
- read by other session等待事件
- AWR实战分析之---- read by other session