Presence bits indicate the status of each column with respect to its nullability, multivalue compressibility, and autocompressibility. Compression presence bits are added to the row header of each row to specify how multivalue compression is used for that row.
Each row has at least one octet of presence bits. The number of octets depends on the degree of the table and the cumulative number of values compressed. The difference between bytes and octets is conceptual. The 8 bits of a byte define an atomic unit, while each bit of an octet is an atomic flag in a bit array. For storage capacity analysis, octets are treated as bytes. All rows for a given table have the same presence bits defined, because nullability and multivalue compressibility are table attributes.
The first bit of the first presence bits octet is set to 1, so the first octet defines the nullability and multivalue compressibility for no more than seven columns. When necessary, additional presence bit octets are added to the row header. Although only 7 of the bits in the first octet are available for use as presence bits, all 8 bits of successive octets are available. Eight bits are used because 255 compressed values plus the indication that an uncompressed value is present require 28, or 256 bit combinations, to be represented.
For a column-partitioned table or join index there is one set of presence bits for each column partition value in the container. If a presence bit is 1, a value is present. If a presence bit is 0, no value is present.
A compression-enabled column for a table has a maximum of 256 presence bits set, depending on the number of values compressed using multivalue compression.