Combined Partitioning Expression for the Sales Table - Teradata VantageCloud Lake

Lake - Database Reference

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ohi1683672393549.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
ohi1683672393549

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