15.00 - Autocompression - Teradata Database

Teradata Database Design

Teradata Database
User Guide


When you create a column‑partitioned table or join index, Teradata Database attempts to use one or more methods to compress the data that you insert into the physical rows of the object unless you specify the NO AUTO COMPRESS option at the time you create it or NO AUTO COMPRESS is set as the default. The process of selecting and applying appropriate compression methods to the physical containers of a column‑partitioned table or join index is referred to as autocompression.

Autocompression is most effective for a column partition with a single column and COLUMN format.

Teradata Database only applies autocompression to column partitions with COLUMN format, and then only if it reduces the size of a container. Teradata Database autocompresses column partitions by default with the following requirements.

  • Minimal CPU resources are required to decompress the data for reading.
  • Teradata Database does not need to decompress many values to find a single value.
  • Teradata Database applies autocompression for a physical row on a per container basis. For efficiency, the system may use the autocompression method chosen for the previous container, including not using autocompression, if that is more effective. Containers in a column partition might be autocompressed in different ways. In most cases, the data type of a column is not a factor, and Teradata Database compresses values based only on their byte representation. As a general rule, the only difference that needs to be considered is whether the byte representation is fixed or variable length.

    For some values there are no applicable compression techniques that can reduce the size of the physical row, so Teradata Database does not compress the values for that physical row, but otherwise the system attempts to compress physical row values using one of the autocompression methods available to it. When you retrieve rows from a column‑partitioned table, Teradata Database automatically decompresses any compressed column partition values as is necessary.

    Because the selection of autocompression methods used for a container is made by Teradata Database and not by users, the methods that autocompression can select from to compress the data in a column partition are not documented in the Teradata user documentation library.