Sunday, March 15, 2009

SGA--- Contd..

2)DB Buffer Cache:When we fire a query for retrieving data or updating the same,the data has to be retrieved from Data file and updated in the same.However this would result in huge overhead in case of frequently accessed data.Hence to avoid this and to have faster retrieval and update of data,we have memory cache component known as "Database Buffer Cache"in the SGA.When a query is fired for the first time,the block is read from the Data file and a copy of the same is stored in the DB Buffer Cache.The next request for the same data is satisfied from the DB Buffer Cache.This saves a lot of time and makes execution faster.
  • DB Cache follows LRU algorithm to remove the aged out/least recently used DB blocks.
  • The size of each Buffer in the DB Cache is equal to the size of Oracle Block(Which may consist of multiple OS Blocks) and is defined by Parameter : "DB_BLOCK_SIZE".
3)Redo Log Buffer Cache :What happens when you modify the Data Blocks?What would happen when You realise after multiple updates to a table that actually those updates were meant for a different table.You have deleted certain entries and inserted some new.What to do in such a scenario?Well the Developers of Oracle DB Server knew that we were humans and bound to make mistakes.Hence they provided us with Redo Log Buffer Cache.This cache stores all the modifications made to the Data Blocks for us to have an option to redo all the changes made if need be and return to the Original State.

  • The Redo Log Buffer Cache is actually a circular buffer with each entry known as a "Redo Entry".The entries get inserted in a circular fashion.
  • Sized by Parameter : LOG_BUFFER.
You may be thinking what happens when the Buffer is full?
Well we will discuss this when we talk about "LGWR" Background Process.

4)Large Pool:The Large pool acts as a supplement to the Shared Pool.It actually relieves the Shared Pool of the burden by volunteering to store several important Information.It is used for storing Shared server session Information, allocates memory for IO,backup and recovery Processes.

  • Large Pool is an optional Memory area
  • Large Pool is used when parameter "PARALLEL_AUTOMATIC_TUNING" is set to true otherwise Shared Pool gets this memory.
  • Sized by Parameter "LARGE_POOL_SIZE".
5)Java Pool :This again is an Optional Memory area and required when we are installing and using Java.

  • Java Pool is used for Parsing of Java Commands.
  • Sized by parameter "JAVA_POOL_SIZE".
I will discuss the Different Database files and their importance in my next post.

No comments:

Post a Comment