Buffer Cache Chain (Hot Block)

本文分析了Oracle数据库中缓存缓冲区链的使用情况,特别是热点块的问题,并提供了针对缓存缓冲区链条高请求次数的解决策略,包括优化SQL查询、改变循环方式以使用哈希连接、以及考虑使用ASM代替MSM。

DBA Notes: 2011/10/11

Cheng Li

 

Buffer Cache Chain (Hot Block)

 

From AWR reports, we found a huge number of cache buffers chain as following:

 

                                         Pct    Avg   Wait                 Pct

                                    Get    Get   Slps   Time       NoWait NoWait

Latch Name                     Requests   Miss  /Miss    (s)     Requests   Miss

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

cache buffer handles          4,563,672    0.0    0.0      0            0    N/A

cache buffers chains      1,304,165,784    0.4    0.0      0   33,177,665    0.0

cache buffers lru chain       6,000,558    0.1    0.0      0   34,014,998    0.0

cache table scan latch           85,013    0.0             0       85,013    0.0

cas latch                            58    0.0             0            0    N/A

The latch: cache buffers chains Oracle metric are used to protect a buffer list in the buffer cache. These latches are used when searching for, adding, or removing a buffer from the buffer cache. Contention on this latch usually means that there is a block that is greatly contended for (known as a hot block).

But, there is no Wait time. So, there is no contention for this latch.

If it is listed in wait event, we can perform. following action to resolve:

1)      Tune SQL for hot block

2)      Change nest loop to hash join

3)      Use ASM instead of MSM

Reference:

http://www.dba-oracle.com/m_latch_cache_buffers_chains.htm

http://www.cernatis.com/index.php?option=com_content&view=article&id=92

select latch#,name,gets,misses,sleeps from v$latch where name like 'cache buffer%';

LATCH# NAME GETS MISSES SLEEPS
---------- ------------------------------ ---------- ---------- ----------

fj.png6KEN89QK3LF60003.jpg

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

转载于:http://blog.itpub.net/26136400/viewspace-709174/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值