Example: Compression Using ALC Only - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

In this example, assume that the default server character set is UNICODE. The NULLs in the Description column are compressed. The non-null values of the Description column are compressed using the Teradata-supplied function, TransUnicodeToUTF8. The TransUTF8ToUnicode function uncompresses the values compressed by the TransUnicodeToUTF8 function.

CREATE TABLE Pendants
   (ItemNo INTEGER,
    Description VARCHAR(1000)
       COMPRESS USING TD_SYSFNLIB.TransUnicodeToUTF8
       DECOMPRESS USING TD_SYSFNLIB.TransUTF8ToUnicode);