With regular logical IOs the buffer contents are not read while holding the CBC(Cache Buffer Chian) latch:
- 1# Take CBC latch into shared mode
- 2# Walk the buffer hash chain until you find the relevant buffer header
- 3# Upgrade the CBC latch to Exclusive mode
- 4# Pin the buffer header
- 5 # Release the CBC latch
- 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# Take the CBC latch again(in shared mode)
- 8$ Unpin the buffer header
- 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# Take CBC altch in shared mode
- 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# Now access the buffer data
- 4# Release the CBC latch
from TanelPoder’s