SEARCH HERE

Server Process and DB Buffer Cache



When a query is processed, the Oracle server process looks in the database buffer cache for any blocks that it needs. If the block is not found in the database buffer cache, the server process reads the block from the data file and places a copy in the database buffer cache. Because subsequent requests for the same block may find the block in memory, the requests may not require physical reads. The Oracle server uses the least recently used algorithm to age out buffers that have not been accessed recently to make room for new blocks in the database buffer cache.
Buffers in the buffer cache can be in one of the following four states:
Pinned: Multiple sessions are kept from writing to the same block at the same time. Other sessions wait to access the block.

Clean: The buffer is now unpinned and is a candidate for immediate aging out, if the current contents (data block) are not referenced again. Either the contents are in sync with the block contents 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 the clean state, except that the buffer has not been used.

Dirty: The buffer is no longer pinned but the contents (data block) have changed and must be flushed to the disk by DBWn before it can be aged out.