read by other 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.

       当请求一个数据时,如果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 同时出现。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值