Re: How to flush data most efficiently from memory to disk when db checkpoint?

From: Bob Badour <>
Date: Sun, 01 Jul 2007 10:35:31 -0300
Message-ID: <4687ad90$0$4344$>

Sune wrote:

> Hi,
> I'm looking into designing an in-memory DB and I wonder:
> How to flush data most efficiently when I checkpoint?
> Say I have a page size of 8K and 1K of those have been updated in
> random places, that is, the changes may be contiguous but most likely
> they are not.
> Will it always be more efficient to flush the whole page instead of
> keeping track of each element and write them to disk one by one?
> Obviously, if I did this I would flush them from page offset 0 to the
> end of the page, in that order.
> Sorry to bother you with such elementary questions but I want to get
> things right from the beginning, and other people's experiences are
> usually very helpful.
> Thanks for your time
> /Sune

Write the whole thing. Most of your time will be spent getting the read/write heads over the proper track and waiting for the start of the block to rotate under the heads. Received on Sun Jul 01 2007 - 15:35:31 CEST

Original text of this message