Subject Re: [firebird-support] Re: Firebird 3.0 database page size
Author Ann Harrison
Lukasz,

> First of all i am wondering if my calculations are correct.

First, trust the code more than the comments. Not everyone
who worked on Firebird - me included - really understood how
the whole thing works. When there's a contradiction between
the code and the documentation, trust the code.

The page formats for Firebird were one of the first parts of the
design, and were based on even earlier designs, created circa
1977. The formula for creating record numbers and translating
from record numbers to data locations was adequate at that
time - when a gigabyte database was unimaginable - but it
has evolved into a design flaw. Changing from a 32 to a 40
bit record number helped. Changing the assumption of record
data size from zero to say 50 bytes would help. Having a
second level of indirection so the record number space is
dense would also help, but that's a major change.

You might try changing the computation of the max number of
records per page to use 67 rather than 17 bytes per record.
That might give you the density you need with relatively minor
code changes. Or it might not work at all... I can' think what
might depend on that calculation, but there may well be something.

Good luck,

Ann