15.00 - Chapter 11 Compression/Decompression Functions - Teradata Database

Teradata Database SQL Functions, Operators, Expressions, and Predicates

Teradata Database
Release Number
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

This chapter describes the functions that you can use with algorithmic compression (ALC) to compress and uncompress column data of character or byte type. Compression of data reduces space usage and the size of disk I/Os.

If the compression and decompression functions described in this chapter are not optimal for your data, you can write your own user-defined functions (UDFs) to compress and uncompress table columns.

Note: Using ALC together with block-level compression (BLC) may degrade performance, so this practice is not recommended.


The functions in this chapter are embedded services system functions. For information on activating and invoking embedded services functions, see “Embedded Services System Functions” on page 24.


FOR more information on...



  • “COMPRESS and DECOMPRESS Phrases” in SQL Data Types and Literals.
  • “CREATE TABLE” in SQL Data Definition Language.
  • writing UDFs for ALC

  • “Defining Functions for Algorithmic Compression” in SQL External Routine Programming.
  • “CREATE TABLE” in SQL Data Definition Language.
  • compression methods supported by Teradata Database and a comparison of the various methods

  • “Using Data Compression” in Database Administration.
  • “Compression Methods” appendix in Database Administration.