逻辑读时的cbc latch(一)

逻辑读时,申请两次cbc latch,我们验证一下:

SQL> select rowid,dbms_rowid.rowid_relative_fno(rowid) file#,dbms_rowid.rowid_block_number(rowid) block#,deptno,dname from syk.test where rownum=1;

ROWID                   FILE#     BLOCK#     DEPTNO DNAME
------------------ ---------- ---------- ---------- --------------
AAAVodAAEAAAAILAAA          4        523         10 ACCOUNTING



SQL> select hladdr from x$bh where file#=4 and dbablk=523;

HLADDR
----------------
000000007D94A658

SQL> select addr,name,gets from v$latch_children  where addr='000000007D94A658';

ADDR
----------------
NAME                                                                   GETS
---------------------------------------------------------------- ----------
000000007D94A658
cache buffers chains                                                     53

SQL> select deptno,dname from syk.test where rowid='AAAVodAAEAAAAILAAA';

    DEPTNO DNAME
---------- --------------
        10 ACCOUNTING

SQL> select addr,name,gets from v$latch_children  where addr='000000007D94A658';

ADDR
----------------
NAME                                                                   GETS
---------------------------------------------------------------- ----------
000000007D94A658
cache buffers chains                                                     55

SQL> select spid from v$session s,v$process b where s.paddr=b.addr and s.sid in(select sid from v$mystat where rownum=1);

SPID
------------------------
3796

一次逻辑读要加两次CBC Latch,一次为了加Buffer Pin,一次为了释放Buffer Pin

未完。。。

逻辑读时的cbc latch(二):http://qhd2004.blog.51cto.com/629417/1576579


逻辑读时的cbc latch(三): http://qhd2004.blog.51cto.com/629417/1577532

你可能感兴趣的:(cache,buffers,latch,逻辑读,chains)