Compressing Data Loaded into Empty Tables Set to MANUAL - Teradata VantageCloud Lake

Lake - Database Reference

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ohi1683672393549.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
ohi1683672393549

To compress data you are loading into an empty permanent or global temporary table that has the MANUAL compression setting, specify BlockCompression in a SET QUERY_BAND statement:

SET QUERY_BAND = ‘BlockCompression=YES;’ FOR SESSION;
If you set BlockCompression to a value other than the keywords in the following table, the BlockCompression value is not valid.

Possible values for BlockCompression, which are applicable to session and transaction query bands, include:

BlockCompression SET QUERY_BAND Keywords Result
YES Compress all primary table data, primary compressible LOBs (JSON, XML, and character LOBs), fallback table data, and fallback compressible LOBs (JSON, XML, and character LOBs).
NO Do not compress any new data.
ALL Compress all primary table data, primary compressible LOBs (JSON, XML, and character LOBs), fallback table data, and fallback compressible LOBs (JSON, XML, and character LOBs). Same effect as YES.
NONE Do not compress any data. Same effect as NO.
FALLBACK Compress fallback table data and fallback compressible LOBs (JSON, XML, and character LOBs).
You cannot use the NO FALLBACK option and the NO FALLBACK default on platforms optimized for fallback.
ONLYCLOBS Compress primary and fallback compressible LOBs (JSON, XML, and character LOBs).
WITHOUTCLOBS Compress all data except primary and fallback compressible LOBs (JSON, XML, and character LOBs).
FALLBACKANDCLOBS Compress fallback table data and primary and fallback compressible LOBs (JSON, XML, and character LOBs).
The XML data type is only supported on the Block File System on the primary cluster. It is not available for the Object File System.
Secondary index primary and fallback subtables are not compressed, regardless of table-level attributes and the BlockCompression query band.

The BlockCompression query band setting cannot override a table-level setting of ALWAYS or a system-level setting of NEVER.