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

Shouldn't we have waited for buffer busy waits while waiting CBC latch?

原创 Anbob 2018-08-12
617
With regular logical  IOs the buffer contents are not read while holding the CBC(Cache Buffer Chian) latch:

  1.  1#  Take CBC latch into shared mode

  2.  2# Walk the buffer hash chain until you find the relevant buffer header

  3.  3# Upgrade the CBC latch to Exclusive mode

  4.  4# Pin the buffer header

  5.  5 # Release the CBC latch

  6.  6 # Now access the buffer data( call transaction,  data layer etc)   -- if someone else wants to pin the buffer now , they'd wait for buffer busy waits

  7.  7# Take the CBC latch again(in shared mode)

  8.  8$ Unpin the buffer header

  9.  10# Release the CBC latch


Sometimes "short" logical IOs can skip a few steps
with "short" LIOs like unique index lookup LIO(etc) Oracle can avoid the buffer pinning codepath:

  1.  1# Take CBC altch in shared mode

  2.  2# Walk the buffer hash chain until you find the relevant buffer header -- This show up as consistent reads - examination  conter in v$sesstat

  3.  3# Now access the buffer data

  4.  4# Release the CBC latch


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

评论