您的位置:首页 > 数据库 > Oracle

Oracle 10g read by other session 等待 说明

2012-07-10 22:12 441 查看
在AWR中,我们可能会看到如下信息:





这里是Read byother session 等待占用了很多的时间。

关于Read by other session 的说明如下:
When informationis requested from the database, Oracle will first read the data from disk intothe database buffer cache. If two or more sessions request the sameinformation, the first session will read the data into the buffer cache whileother sessions wait. In previous versions this wait was classified under the"buffer busy waits" event. However, in Oracle 10.1 and higher thiswait time is now broken out into the "read by other session" waitevent. Excessive waits for this event are typically due to several processesrepeatedly reading the same blocks, e.g. many sessions scanning the same indexor performing full table scans on the same table. Tuning this issue is a matterof finding and eliminating this contention.
--当我们请求一个数据时,Oracle 第一次会从磁盘将数据读入buffer cache。如果有两个或者多个session 请求相同的信息,那么第一个session 会将这个信息读入buffer cache,其他的session 就会出现等待。 在10g之前,该等待事件还是在bufferbusy waits 之下,在Oracle 10g之后,单独将该事件拿出并命令为read by other session。
一般来说出现这种等待事件是因为多个进程重复的读取相同的blocks,比如一些session 扫描相同的index或者在相同的block上执行full table scan。解决这个等待事件最好是找到并优化相关的SQL语句。

Readby other session 等待的出现也说明数据库存在读的竞争,所以该等待事件通常和db file sequential read或db file scattered read 同时出现。





-------------------------------------------------------------------------------------------------------
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Skype: tianlesoftware
QQ: tianlesoftware@gmail.com
Email: tianlesoftware@gmail.com
Blog: http://www.tianlesoftware.com
Weibo: http://weibo.com/tianlesoftware
Twitter: http://twitter.com/tianlesoftware
Facebook: http://www.facebook.com/tianlesoftware
Linkedin: http://cn.linkedin.com/in/tianlesoftware


-------加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请----
DBA1 群:62697716(满); DBA2 群:62697977(满) DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群:83829929 DBA5群: 142216823
DBA6 群:158654907 DBA7 群:172855474 DBA总群:104207940
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: