2,025 views
1 votes
1 votes
I am confused regrading the significance of checkpoint i.e. is it that whenever we place checkpoint does that mean that all the data items before it have been written onto the data base , if not then why do we place it below the transactions which have simply written the data item but not yet committed ?

1 Answer

1 votes
1 votes
checkpoints are inserted in order to make the recovery process more simpler. instead of writing everything to the stable storage at the end, we issue checkpoint in different occassion. Once a check point is encountered all the dirty pages of all transaction ( committed and non committed ) is flushed to the stable storage. Also the transaction log is flushed to storage

Now if there is any need of any recovery, if we need to do a redo , then we need to do it only after the checkpoing

if it is an undo also we need to do it for before the check  point (for transaction which were not committed at the time of checkpoint)
those transactions which were committed before checkpoint, there is no need to do anything.

 

please note in reality some transaction/ schecules may take a very long time to complete. so it is always better to use checkpoints

Related questions