Teradata Multivalue Compression – a Quick Approach

Nemo / Pixabay

teradata multivalue compression

Whenever you have to analyze a huge Teradata table regarding Multivalue compression, from a workload point of view, this is a costly operation.

Unfortunately, Teradata (the company) does not offer any tool which would allow automatizing this task.

Usually, analysis requires counting the number of distinct values per table column. Counting is resource and time intense for huge tables.

Luckily, with Teradata 14.10 we have a less costly method available:


Above statement outputs the most biased column values and many other useful statistics about a column. Usually, the biased values are great candidates for Teradata Multivalue compression.

The advantage of this approach is that no costly table analysis is required (compare this against the approach of counting the distinct column values for each column of a huge table), nevertheless it delivers astoundingly good compression suggestions.

By additionally using the number of NULL values per column, you should have a great starting point for a quick win regarding space reduction.

Nevertheless, as good as this method is for achieving quick results, it comes with some drawbacks:

  1. It only works for columns with collected and correct statistics.
  2. Unfortunately, the information used in the SHOW STATISTICS statement is taken from a binary object (“FieldStatistics”). There is no easy way to extract this information. As a substitute, we have to use the text output of the statement and parse it, to be able to automatize the process of creating compress statements.
Our Reader Score
[Total: 7    Average: 4.1/5]
Teradata Multivalue Compression – a Quick Approach written by Roland Wenzlofsky on March 18, 2015 average rating 4.1/5 - 7 user ratings


Please enter your comment!
Please enter your name here