Posted by dbtan on 12月 6th, 2009 Library cache pin/lock 在Oracle 10g的增强:
从Oracle 10g开始,以上测试将不会看到同样的效果,这是因为Oracle 10g对于对象编译与重建做出了增强。注意以下测试(来自Oracle 10gR2环境): [email protected]> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';Session [email protected]> select object_nam
... ...
<阅读全文>
Posted by dbtan on 12月 6th, 2009 LIBRARY CACHE LOCK 等待事件:
接上篇日志,如果此时再发出一条grant或compile的命令,那么library cache lock等待事件将会出现。 Session 3:[email protected]> alter procedure pining compile; 此进程挂起,查询v$session_wait视图可以获得以下信息: [email protected]> select * from v$session_wait where event like '
... ...
<阅读全文>
Posted by dbtan on 12月 5th, 2009 LIBRARY CACHE PIN 等待事件:
Oracle文档上这样介绍这个等待事件:library cache pin是用来管理library cache的并发访问的,pin一个Object会引起相应的heap被载入内存中(如果此前没有被加载),pins可以在Null、Share、Exclusive这3个模式下获得,可以认为pin是一种特定形式的锁。
当library cache pin等待事件出现
... ...
<阅读全文>
Posted by dbtan on 12月 4th, 2009 Library Cache Pin 及 Library Cache Lock分析:
Oracle使用两种数据结构来进行Library Cache的并发访问控制:lock和pin。lock可以被认为是解析锁,而pin则可以被认为是以读取或改变对象内容为目的所加的短时锁。之所以将Library Cache Object对象分开,使用多个锁定来保护,其中一个重要的目的就是为了提高并发。
l
... ...
<阅读全文>
Recent Comments