Database buffer cache
The database buffer cache caches blocks of data retrieved from the database. This buffer between the users’ requests and the actual datafiles improves the performance of the Oracle database. If a piece of data can be found in the buffer cache, you can retrieve it from memory without the overhead of having to go to disk. Oracle manages the cache using a least recently used (LRU) algorithm. This means that if a user requests data that has been recently used, the data is more likely to be in the database buffer cache and can be delivered immediately without having to execute a disk read operation.
Oracle7 had one pool of buffers for database blocks. Oracle8 introduced multiple buffer pools. Three pools are available in Oracle8 and beyond:
- DEFAULT
The standard Oracle database buffer cache. All objects use this cache unless otherwise indicated.
- KEEP
For frequently used objects you wish to cache.
- RECYCLE
For objects that you’re less likely to access again.
Both the KEEP and the RECYCLE buffer pools remove their objects from consideration by the LRU algorithm.
You can mark a table or index for caching in a specific buffer pool. This helps to keep more desirable objects in the cache and avoids the “churn” of all objects fighting for space in one central cache.