15.00 - Specifying DECIMAL and NUMERIC Precisions - Teradata Database

Teradata Database Design

Teradata Database
User Guide

Specifying DECIMAL and NUMERIC Precisions

Storage requirements for decimal data types are a function of the precision required of the values to be stored. The following table indicates the number of bytes used to store DECIMAL and NUMERIC data types of various precisions.


                 Number of Precision Digits

                Number of Bytes Stored

                                       1 - 2


                                       3 - 4


                                       5 - 9


                                     10 - 18


You can achieve optimal space savings by using multi-value compression together with an efficient decimal size. An example would be to define decimal precision such that a 4-byte representation was used instead of an 8-byte representation, for example DECIMAL(9) instead of DECIMAL(10). Then, multi-value compression could be used on the most frequently occurring values to reduce the storage overhead still further.