When the majority of column values are unique, algorithmic compression can provide better compression results than multiple-value compression. Algorithmic compression allows you to define your own compression and decompression algorithms and apply those algorithms to data at the column level.
You implement an algorithm as an external C/C++ scalar UDF and then specify the algorithm in the column definition of a CREATE TABLE/ALTER TABLE statement. Teradata Vantage™ invokes these algorithms to compress and uncompress the column data when the data is moved into the tables or when data is retrieved from the tables.
Use ALC to implement the compression scheme that is most suitable for data in a column. The cost of compression and uncompression depends on the algorithm chosen.
You can specify ALC alone, or both MVC and ALC on the same column. If you define both on the same column, ALC is applied only to those non-null values that are not specified in the value compression list of the MVC specification.
- ARRAY
- BYTE
- VARBYTE
- BLOB
- CHARACTER
- VARCHAR
- CLOB
- JSON, with restrictions—see COMPRESS and DECOMPRESS Restrictions.
- TIME and TIME WITH TIME ZONE
- TIMESTAMP and TIMESTAMP WITH TIME ZONE
- Period types
- Distinct UDTs, with restrictions—see COMPRESS and DECOMPRESS Restrictions.
- System-defined UDTs, with restrictions—see COMPRESS and DECOMPRESS Restrictions.