I have the following 2 doubts on compression related calculations (Reference : Database Design Document, Section : Database Level Capacity Planning Considerations --> Calculating the efficiency of Compression --> Expanded Examples)
1. Field Size during compression : Suppose the field size is 10 bytes, they refer that the base field size is 10 bytes and the calculated field size is 12 bytes.In most examples they add 2 bytes to the base field size.
I would like to know the reason behind generally adding 2 bytes (or the additional bytes added is a variable one and not 2 bytes always?)
Is this something that is related to Presence Bits octets?
2. Additional Row header Space : Do we need additional Row header space if we are compressing just one value under one column in a table.(Since we dont need an extra Presence Octet)
For instance in the first example in that section it has been given that the additional row header space is 250 000 000 Bytes for the following Specification.
No of Amps : 10 Column Nullability : Nullable Cardinality : 1 * 10 ^ 9 No of rows having compressible values : 1 * 10 ^ 8 No of non Null Values to compress : 1 Field Size : 10 Bytes Fall back : Yes
Please let me know the logic behind the need for additional Row header space of 250 MB when one goes for compression in this case.