understanding the Oracle Library Cache Pin WaitEvent

本文探讨了Oracle数据库中Library Cache Pin Wait事件的概念及其影响。该事件与Library Cache并发有关,在会话尝试锁定Library Cache中的对象进行修改或检查时触发。文章还介绍了如何通过SQL来诊断引发此等待事件的会话。

understanding the Oracle Library Cache Pin WaitEvent

By Richmond SheeKirtikumar DeshpandeK Gopalakrishnan

The library cache pin wait event isassociated with library cache concurrency. It occurs when the session tries topin an object in the library cache to modify or examine it. The session mustacquire a pin to make sure that the object is not updated by other sessions atthe same time. Oracle posts this event when sessions are compiling or parsingPL/SQL procedures and views.

Table 1.LatchEvents in Oracle Database 10g

What actions to take to reduce these waitsdepend heavily on what blocking scenario is occurring. A common problemscenario is the use of DYNAMIC SQL from within a PL/SQL procedure where thePL/SQL code is recompiled and the DYNAMIC SQL calls something that depends onthe calling procedure. If there is general widespread waiting, the shared poolmay need tuning. If there is a blocking scenario, the following SQL can be usedto show the sessions that are holding and/or requesting pins on the object thatare given in P1 in the wait:

Wait Parameters

Wait parameters for library cache pin aredescribed here:

·        P1 Address of the object being examined or loaded

·        P2 Address of the load lock

·        P3 Contains the mode plus the namespace (mode indicateswhich data pieces of the object are to be loaded; namespace is the objectnamespace as displayed in V$DB_OBJECT_CACHE view)

 Wait Time

For the PMON process it is one second; forall others it is three seconds.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值