暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle Mutex 等待事件之: cursor pin X

原创 eygle 2017-07-04
1010

在 Oracle 官方文档,关于 cursor pin X 等待事件的说明是:





A session waits on this event when it is requesting an exclusive mutex pin for a cursor object and it must wait because the resource is busy. The mutex pin for a cursor object can be busy either because a session is already holding it exclusive, or there are one or more sessions which are holding shared mutex pin(s). The exclusive waiter must wait until all holders of the pin for that cursor object have released it, before it can be granted. Wait Time: Microseconds



翻译过来就是:



当一个会话对一个 cursor 对象请求 排他模式的 Mutex pin 时,因为该对象已有 X 或者 S 模式的 Mutex pin 存在,所以必须处于等待。直至所有 X 或 S 模式的 pin 被释放后,才能够获得 X pin。



cursor pin X 等待有三个参数,第一个参数就是 cursor 的 hash value。






















ParameterDescription

P1



Hash value of cursor



P2



Mutex value (top 2 bytes contains SID holding mutex in exclusive mode, and bottom two bytes usually hold the value 0)



P3



Mutex where (an internal code locator) OR'd with Mutex Sleeps







需要对 Cursor 执行 Pin X 的操作包括:



  • 会话在某些串行化操作时需要获得 X 模式的 Pin,例如构建一个子游标;

  • 在Cursor 上执行排他操作,如 dbms_shared_pool.purge, keep/unkeep 等;

  • 一个或多个进程正在reference 该Mutex (shared mutex pin)



「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论