Subject | Re: [firebird-support] Calcurate row size |
---|---|
Author | Ivan Prenosil |
Post date | 2004-07-13T15:51:31Z |
> If you have most of your fingers and toes, you can do it without a calculator.db_key is pointer to row, so it is not stored here.
>
> 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
> and the row offset (or is2 bytes offset + 2 bytes length.
> it 4 bytes?)
Plus null indicators, version number (1), transaction number (4), delete flag,
pointer to previous version (4), ...
Ivan