Sunday 24 July 2016

TRAINING (ORA-2) - Different Stages of Buffer in the Buffer Cache


Different Stages of Buffer in the Buffer Cache
Oracle uses least recently used algorithm to age out buffers that have not been accessed recently to make room to new blocks in database buffer cache. Buffer in the Buffer cache can be in any of the four stages:

Pinned: Multiple sessions are kept from writing to the same block at the same time. Other sessions wait to access the block.

Clean: Buffer is now unpinned and is a candidate for immediate aging out, if the current contents (data blocks) are not referenced again. Either the contents are in sync with the block stored on the disk or the buffer contains a consistent read (CR) snapshot of a block.

Free or Unused: The buffer is empty because the instance has just started. This state is very similar to clean state except that the buffer has not been used.

Dirty: Buffer is no longer pinned but the content (data blocks) have changed and must be flushed to the disk by DBWn before it can be aged out.

No comments:

Post a Comment