Number of Columns that Can Be Compressed - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
zsn1556242031050.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantage™

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.