Contents of database buffer cache [message #296617] |
Mon, 28 January 2008 07:27 |
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 #296659 is a reply to message #296617] |
Mon, 28 January 2008 09:58 |
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.
|
|
|
|