Number of Columns that Can Be Compressed

Teradata Vantage™ Data Types and Literals

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1143-162K

You can compress as many columns as practical for any table. However, compressing a substantial number of values in a table using MVC can contribute to table header overflow.

IF you specify … THEN …
COMPRESS with:
  • no argument
  • NULL enclosed in parentheses
nulls are compressed for nullable columns.

NULL cannot be specified in a COMPRESS phrase for a column that is declared NOT NULL.

COMPRESS with a constant the indicated value is compressed. For nullable columns, nulls are also compressed.
COMPRESS with:
  • a multi-valued, comma-separated list of constant values enclosed in parentheses
  • a multi-valued, comma-separated list of constant values and NULL enclosed in parentheses
nulls and the specified distinct values are compressed for nullable columns. Nulls are compressed for nullable columns regardless of whether NULL appears in the list.

NULL cannot appear in a COMPRESS phrase for a column that is declared NOT NULL.

COMPRESS USING compress_udf DECOMPRESS USING decompress_udf nulls are compressed for nullable columns. Non-null column values that are not specified in the value compression list are compressed using the specified compress UDF, and decompressed using the specified decompress UDF.