遇到buffer busy chains 如何处理

[复制链接]
查看11 | 回复9 | 2005-10-27 20:45:16 | 显示全部楼层 |阅读模式
遇到buffer busy chains 如何处理
SQLWKS> select * from v$session_wait
2> where event not like 'rdbms ipc message' and event not like 'SQL*Net message from client';
SIDSEQ# EVENT
P1TEXT
P1 P1RAWP2TEXT
P2 P2RAWP3TEXT
P3 P3RAWWAIT_TIMESECONDS_IN STATE

---------- ---------- ---------------------------------------------------------------- ---------------------------------------------------------------- ---------- -------- ---------------------------------------------------------------- ---------- -------- ---------------------------------------------------------------- ---------- -------- ---------- ---------- -------------------
16031498 latch free
address
1106904856 41FA0718 number
98 00000062 tries
13 0000000D
0
0 WAITING

19533733 latch free
address
1106904856 41FA0718 number
98 00000062 tries
11 0000000B
0
0 WAITING

205641 latch free
address
1106904856 41FA0718 number
98 00000062 tries
11 0000000B
0
0 WAITING

39317512 latch free
address
1106904856 41FA0718 number
98 00000062 tries
13 0000000D
0
0 WAITING

113395 pmon timer
duration
300 0000012C
0 00
0 00
0
0 WAITING

5 9396 smon timer
sleep time
300 0000012C failed
0 00
0 00
0115 WAITING

431 5720 SQL*Net break/reset to client
driver id
1413697536 54435000 break?
0 00
0 00
-1 31 WAITED KNOWN TIME
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
98号的latch
select *
from v$latchname
where latch# = number;
是buffer busy chains
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
latch free
The process waits for a latch that is currently busy (held by another process).
Parameter Description
address The address of the latch for which the process is waiting
number The latch number that indexes in the V$LATCHNAME view.To find more information on the latch, use the following SQL statement:
select *
from v$latchname
where latch# = number;

tries A count of the number of times the process tried to get the latch (slow with spinning) and the process has to sleep
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
查了查metalink
Cache Buffers Chains Latch waits are caused by contention where multiple sessions waiting to read the same block.
Cache Buffers Chains Latch waits 由多个会话等待去读相同的块而引起

Typical solutions are:-
o Look for SQL that accesses the blocks in question and determine if the repeated reads are necessary.
查看那些访问疑问块的SQL语句并判断重复读是否是必须的
o Check for suboptimal SQL (this is the most common cause of the events) - look at the execution plan for the SQL being run and try to reduce the gets per executions which will minimise the number of blocks being accessed and therefore reduce the chances of multiple sessions contending for the same block
检查那些不理想的语句(这些是大多数通常该事件的原因),查看正在运行的SQL语句的执行计划并减少每次执行的gets,这将会减少(minimise)被访问的块的数量,因此减少多个会话争用相同块的机会。
Note 34405.1 WAITEVENT: "buffer busy waits" Reference Note
Note 42152.1 LATCH: CACHE BUFFERS CHAINS
Note 155971.1 Ext/Pub Resolving Intense and "Random" Buffer Busy Wait Performance Problems:
Note 163424.1 Ext/Pub H
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
Subject:LATCH: CACHE BUFFERS CHAINS
Doc ID:42152.1 Type:REFERENCE
Modified Date :20-OCT-2005 Status:PUBLISHED
Eg: Given ADDR from V$LATCH_CHILDREN for a heavily contended

child latch:

select dbafil, dbablk, class, state

from X$BH where HLADDR='address of latch';
请问找出 dbafil,dbablk然后可以怎么样呢
class,state 有什么解释吗?
谢谢
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
如何使用ORADEBUG HANGANALYZE收集了数据库当时的状态信息?
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
ALTER SYSTEM SET EVENTS 'IMMEDIATE TRACE NAME SYSYTEMSTATE LEVEL 10';
ALTER SYSTEM SET EVENTS 'IMMEDIATE TRACE NAME HANGANALYZE LEVEL 3';
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
有详细的文档吗?
CACHE BUFFERS CHAINS 一般如何处理呢,谢谢
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
原帖由 道可道非常道 于 2008-12-31 12:22 发表
有详细的文档吗?
CACHE BUFFERS CHAINS 一般如何处理呢,谢谢

就还是SQL语句的问题,还是从优化开始.
回复

使用道具 举报

千问 | 2005-10-27 20:45:16 | 显示全部楼层
上METALINK搜索到一篇相关的文章,
把后缀改成.HTM 即可读.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行