IDKCS011097
Data was uncompressed in the target table although INSERT was submitted after query band "BLOCKCOMPRESSION=YES" WrittenFeb 28, 2018

 
Attachments0
  

Product Categories
Teradata Database

 Problem
Data in the target table was not BLC compressed although the INSERT was submitted after the following query band statement was issued:
 
SET QUERY_BAND = 'BLOCKCOMPRESSION=YES;' FOR SESSION;

Environment/Conditions/Configuration
TDBMS 15.10.07.04

Cause

The query band "BLOCKCOMPRESSION=YES" was issued before inserting data into a non-empty table which has uncompressed data.


Solution

Following is written in the Orange Book for Block-Level Compression:

Chapter 11 "Query Bands for Managing Compression"

Query bands are an alternate technique to the Ferret utility for initiating and managing block-level compression, but they only apply at the table level when the table is being loaded for the first time.
If the table is not empty, the query band is ignored and Ferret commands must be used.


Special Considerations

Additional Information
If INSERT target table already has compressed data before INSERT, appended data will be also compressed regardless of query band setting.
Refer to KCS004272 for the detail.