Combined Partitioning Expression for the Sales Table - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

The corresponding combined partitioning expression is the following.

(RANGE_N(salesdate  BETWEEN DATE '2003-01-01'
                    AND     DATE '2005-12-31'
                    EACH INTERVAL '1' YEAR)-1)*12+
(RANGE_N(storeid    BETWEEN 1
                    AND   300
                    EACH  100)-1)*4+
(RANGE_N(productid  BETWEEN 1
                    AND   400
                    EACH  100)

There are 3 row partitions for both the first level and second levels, and 4 row partitions for the third level. Therefore, the total number of combined partitions is the product of 3*3*4, or 36.

The following diagram indicates the logical hierarchy of the three row partitioning levels for the sales table (65,535 assumes 2-byte partitioning):


Logical hierarchy of 3-row partitioning