Column Partitions With COLUMN Format
A column partition with COLUMN format packs column partition values into a physical row, or container, up to a system-determined limit. The column partition values must be in the same combined partition to be packed into a container.
The row header occurs once for a container instead of there being a row header for each column partition value.
The format for the row header is either 14 or 20 bytes and consists of the following fields.
The rowID of the first column partition value is the rowID of the container.
The rowID of a column partition value can be determined by its position within the container. If many column partition values can be packed into a container, this row header compression can greatly reduce the space needed for a column‑partitioned object compared to the same object without column partitioning.
If Teradata Database can only place a few column partition values in a container because of their width, there can actually be an increase in the space needed for a column‑partitioned object compared to the object without column partitioning. In this case, ROW format might be more appropriate.
If Teradata Database can only place a few column partition values because the row partitioning is such that only a few column partition values occur for each combined partition, there can be a very large increase in the space needed for a column‑partitioned object compared to the object without column partitioning. In the worst case, the space required for the column‑partitioned object can be as much as 24 times larger.
In this case, consider altering the row partitioning to allow for more column partition values per combined partition or removing column partitioning.
If the container has autocompression, 2 bytes are used as an offset to compression bits, 1 or more bytes indicate the autocompression types and their arguments, if any, for the container, 1 or bytes, depending on the number of column partition values, of autocompression bits, 0 or more bytes are used for a local value-list dictionary depending the autocompression type, and 0 or more bytes are used for present column partition values.
If the container does not have autocompression either because you specified NO AUTO COMPRESS for the column partition or because no autocompression types are applicable for the column partition values of the container, Teradata Database uses 0 or more bytes for column partition values.
The byte length of a container is rounded up to a multiple of 8.
The formats for single‑column and multicolumn partitions with COLUMN format differ slightly, as listed by the following bullets.
See “Row Structure for Containers (COLUMN Format)” on page 759 for more information.