Home » RDBMS Server » Server Administration » Contents of database buffer cache (Oracle 9i)
Contents of database buffer cache [message #296617] Mon, 28 January 2008 07:27 Go to next message
Muddassar
Messages: 28
Registered: March 2007
Junior Member
Hi,
I am reading the database fundamentals. I am confused about one thing. Could not figure it out myself. So, posting. My question is what are all that the database buffer cache contains?
I have some idea:
1. It contains the data read from the datafiles, so that the next time the data can be fetched from the buffer instead of the datafiles.
2. It also contains the data being updated. The same data is written to the datafiles by the DBWn when a commit is issued.
I got confused when i read the following:
"Checkpoints ensure that data blocks in memory that change frequently are written to
data files regularly. Because of the least recently used algorithm of DBWn, a data block
that changes frequently might never qualify as the least recently used block and thus
might never be written to disk if checkpoints did not occur."
As i guessed, data are written into datafiles when we commit the transaction, what are the data that CKPT ensures should be written to the datafiles regularly.
Please give some idea and correct me.
Re: Contents of database buffer cache [message #296639 is a reply to message #296617] Mon, 28 January 2008 08:37 Go to previous messageGo to next message
Michel Cadot
Messages: 68684
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
2. It also contains the data being updated. The same data is written to the datafiles by the DBWn when a commit is issued.

Wrong, DBWR does not write anything on commit. More it is not aware of commits.

Quote:
As i guessed, data are written into datafiles when we commit the transaction

No, only redo records are written on disk on commit, no data.

Quote:
what are the data that CKPT ensures should be written to the datafiles regularly.

So the purpose of checkpoint (not CKPT process): to write modified blocks into files. CKPT process writes checkpoint number in datafile headers.

Regards
Michel
Re: Contents of database buffer cache [message #296659 is a reply to message #296617] Mon, 28 January 2008 09:58 Go to previous messageGo to next message
varu123
Messages: 754
Registered: October 2007
Senior Member
Quote:
2. It also contains the data being updated. The same data is written to the datafiles by the DBWn when a commit is issued.


The reason why the newbies think that commit causes data buffer to be written to database files is due to the way we use the word commit.
What we meant is when you commit you will never loose data but newbies think that it means commit causes data buffer to write to datafiles.

This is what i use to think.
Re: Contents of database buffer cache [message #296738 is a reply to message #296617] Mon, 28 January 2008 22:49 Go to previous message
Muddassar
Messages: 28
Registered: March 2007
Junior Member
Things have become much clear now.
Thanks for the help to all.
Previous Topic: HELP ..HELP..!!Oracle upgrade from 8i to 10g
Next Topic: sqlplus
Goto Forum:
  


Current Time: Tue Sep 17 20:01:02 CDT 2024