the question regarding "Parent and Child Latches", version 11.1.0.7

You Asked

Hello Tom,
Could you please explain the reason behind having both parent and child latches in Oracle? and why some of the parent latches doesn't have child latches?
and what is the differnece between parent and solitary latches?
Why does Oracle is still using _SPIN_COUNT of 2000?I guess the value was set long ago when the processor speeds were much slower.Considering the current processing power of processors,is it recommended to increase the _SPIN_COUNT value? Thanks.

and we said...

first of all, do not touch _ parameters.

Think about it, your logic that spin count should be higher because cpu's are faster would only hold true if the latch holder was running at the OLD SPEED.

Latches are designed to serialize access to shared data structures - shared data structures that are to be held by someone for a very very short period of time. The spin count was set to hold the latch requester on the cpu for a given number of cpu cycles. Now, if the goal was cpu cycles and the cpu cycles become faster - does that mean we should wait for more cpu cycles? No - it wouldn't - we are still holding on for so many cpu cycles. spin_count is not spin_elapsed_time - it is a count of times to spin (cpu cycles to burn) and works regardless of the speed of the cpu cycles.



having child latches allows us to have more than one latch - to break a big structure (say the shared pool) into smaller substructures and assign each a child latch to cover it. If we use the child latch - we typically don't use the parent latch (although we can use it to aggregate statistics up in reports and what not).

If a parent latch doesn't have any children, the structure it protects was not deemed "big enough" - the shared pool is only split up if it is large and you have many cpu's. Also, if you have one cpu - having lots of child latches doesn't make sense anymore (only one thing happening on that system anyway!)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值