CREATE TABLE orders ( o_orderkey INTEGER NOT NULL, o_custkey INTEGER) PRIMARY INDEX (o_orderkey) PARTITION BY RANGE_N(o_custkey BETWEEN 0 AND 100 EACH 10); /* p1 */
This definition implies the following information about the partitioning of orders:
- Number of partitions in the first, and only, level = d1 = 11
- Total number of combined partitions = d1 = 11
- Combined partitioning expression = p1
If the value of o_custkey is 15, then the following additional information is implied:
- Partition number for level 1 = PARTITION#L1 = p1(15) = 2.
- PARTITION#L2 through PARTITION#L15 are all 0.
- Combined partition number = PARTITION = p1(15) = 2.
Value of o_custkey | Result of the RANGE_N function Value of PARTITION Value of PARTITION#L1 |
---|---|
0 - 9 | 1 |
10 - 19 | 2 |
20 - 29 | 3 |
30 - 39 | 4 |
40 - 49 | 5 |
50 - 59 | 6 |
60 - 69 | 7 |
70 - 79 | 8 |
80 - 89 | 9 |
90 - 99 | 10 |
100 | 11 |