Subject Re: [firebird-support] Calcurate row size
Author Helen Borrie
At 02:13 PM 13/07/2004 +0900, you wrote:
> Would someone tell me resources/documents of 'how to calculate number of
>bytes on each row' for FB1.5 ?

If you have most of your fingers and toes, you can do it without a calculator.

Smallint are 2 bytes, Integers 4, BigInt 8. Numeric and decimal 2, 4 or 8
depending on precision. Float 4, double precision 8.

Char = exact number of bytes as defined (No. of characters * character byte
Varchar, exact number of bytes + 2.

Timestamp 8 bytes
Date 4 bytes (dialect 3) or 8 bytes (dialect 1)
Time 4 bytes

Blobs and arrays aren't stored with the row. Allow 4 bytes per blob_id.

Plus, for each row, 2 bytes to store the db_key and the row offset (or is
it 4 bytes?)