From: Ann H. <aha...@ib...> - 2012-01-02 19:49:59
|
On Mon, Jan 2, 2012 at 2:32 PM, Yi Lu <yl...@ra...> wrote: > Approach 1 seems to be least risky. Disk space should not be a big issue with > today's hardware. > The problem is not disk space, but locality of reference. With small records, adding four bytes could decrease the number of rows per page by 10-15%, leading to more disk I/O. That's a significant cost to every database which can be avoided by using a slightly more complicated variable length transaction id or a flag that indicates which size is used for a particular record. Firebird already checks the flags to determine whether a record is fragmented, so the extra check adds negligible overhead And, as an aside, sweeping is not read-only now. It's purpose is to remove unneeded old versions of records from the database. The actual work may be done by the garbage collect thread, but the I/O is there. Good luck, Ann |