Subject Re: [firebird-support] Calcurate row size
Author Ivan Prenosil
> 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
> size)
> 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

db_key is pointer to row, so it is not stored here.

> and the row offset (or is
> it 4 bytes?)

2 bytes offset + 2 bytes length.

Plus null indicators, version number (1), transaction number (4), delete flag,
pointer to previous version (4), ...

Ivan