JSON Data Type | Compressing JSON Type Data | VantageCloud Lake - Compressing JSON Type Data - 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
You can use the following compression functions to perform algorithmic compression (ALC) on JSON type columns:
  • JSON_COMPRESS
  • JSON_DECOMPRESS
  • TD_LZ_COMPRESS
  • TD_LZ_DECOMPRESS

You can use TD_LZ_COMPRESS to compress JSON data; however, Teradata recommends that you use JSON_COMPRESS instead because the JSON_COMPRESS function is optimized for compressing JSON data.

JSON_COMPRESS and JSON_DECOMPRESS can be used to compress JSON type columns only. These functions cannot be used to compress columns of other data types.

You cannot create your own compression and decompression user-defined functions to perform algorithmic compression on JSON type columns. You must use the functions previously listed.

You can use ALC to compress columns that store JSON data using one of the binary storage formats (BSON or UBJSON).

Using ALC with block-level compression (BLC) may degrade performance, so this practice is not recommended. See Block-Level Compression Orange Book, TDN0001167.

For more information about compression functions, see Compression/Decompression Functions.

For information about the COMPRESS and DECOMPRESS phrases, see COMPRESS and DECOMPRESS Phrases.