- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
3#
发表于 2012-8-2 19:30:39
CU LOCK CU
Cursor bind
This document explains about the CU enqueue. This is called bind enqueue.
This enqueue is used when we determine that we have a cursor in the library cache that we can possibly share, but we need to check / set the bind types appropriately. The enqueue is used to protect manipulation of the shared cursor since there is a potential issue with pinning the library cache pin at this point in the code because the code path can then go on to try to pin in either shared or exclusive modes and we have to be careful that we do not have more than one process trying to pin in different modes.
Solution
Reducing Contention:
Normally we would not expect contention with this enqueue but if it is seen then the problem
probably lies somewhere within the library cache. It would not cause any impact as it would go on
its own.
Try to increase shared pool size to avoid the contention.
This may also happen sometimes due to the optimizer features. In higher versions of Oracle database, there are many new features got introduced with optimizer which make the CBO more bulkier and that would lead to increased parse time. So this could have also caused the CU lock during parsing as it takes long time.
Setting the optimizer_features_enable parameter to a lower value in the higher version database would also help.
Ex: optimizer_features_enable='10.1.0.4' in 10.2.0.3 database.
你在修改constraint 即修改表的定义, sid 136 应当在等 library cache pin之类的等待 而非 enqueue lock的 TX或TM ,所以在V$LOCK没记录很正常 |
|