15.00 - Specifying INTEGER Precisions - Teradata Database

Teradata Database Design

prodname
Teradata Database
vrm_release
15.00
category
User Guide
featnum
B035-1094-015K

Specifying INTEGER Precisions

Like the DECIMAL/NUMERIC data type, the INTEGER family of data types offers different levels of precision that you can harness to reduce the number of bytes used to store integer numbers.

The following table indicates the number of bytes used to store integer numbers of various precisions:

 

                      Integer Data Type

                 Number of Bytes Stored

BYTEINT

                                     1

SMALLINT

                                     2

INTEGER

                                     4

BIGINT

                                     8

You can achieve optimal space savings by using multi-value compression together with an efficient integer data type. An example would be to define the precision such that a 1-byte representation was used instead of a 4-byte representation: for example, BYTEINT instead of INTEGER. Then, multi-value compression could be used on the most frequently occurring values to reduce the storage overhead still further.