Buffer Cache 2
Buffer Cache 2
Buffer Cache:
The database buffer cache is the largest memory area in the SGA. This memory area stores the
copies of the data blocks that are read from the database discs.
As this area is in the SGA, this data is available for all the users.
So when the first user runs a query, the related data is read from the disc and stored into the
buffer cache.
When any other user, or maybe the same user wants to reach the same data, before checking
the disc the server checks the buffer cache first.
If all the data we need is already in the buffer cache, it can read the data from the buffer cache
directly.
If some of the data is not there but some of it is already in the buffer cache, it goes to the discs
only for the absent blocks.
If there is no related data with our query in the buffer cache, the server reads all the data from
the disc into the buffer cache.