Partitioning
How Partitioning Works
The following table shows how the records are partitioned using the hypothetical
IntegerPartition
with 1-2-3-4-5-6 bits of partitioning width. The leftmost
column indicates the level. Other cells are the partitions of that level.
Numbers in the cells indicate the partitioning key range that are rolled-up in
the partition.
L6 | 0-63 | |||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
L5 | 0-31 | 32-63 | ||||||||||||||||||||||||||||||
L4 | 0-15 | 16-31 | 32-47 | 48-63 | ||||||||||||||||||||||||||||
L3 | 0-7 | 8-15 | 16-23 | 24-31 | 32-39 | 40-47 | 48-55 | 56-63 | ||||||||||||||||||||||||
L2 | 0-3 | 4-7 | 8-11 | 12-15 | 16-19 | 20-23 | 24-27 | 28-31 | 32-35 | 36-39 | 40-43 | 44-47 | 48-51 | 52-55 | 56-59 | 60-63 | ||||||||||||||||
L1 | 0-1 | 2-3 | 4-5 | 6-7 | 8-9 | 10-11 | 12-13 | 14-15 | 16-17 | 18-19 | 20-21 | 22-23 | 24-25 | 26-27 | 28-29 | 30-31 | 32-33 | 34-35 | 36-37 | 38-39 | 40-41 | 42-43 | 44-45 | 46-47 | 48-49 | 50-51 | 52-53 | 54-55 | 56-57 | 58-59 | 60-61 | 62-63 |
If we currently have 21 records already rolled-up, these are the partition that we will have. If we were to perform a query, the framework will combine the highlighted partitions to get the result:
L6 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
L5 | |||||||||||
L4 | 0-15 | ||||||||||
L3 | 0-7 | 8-15 | |||||||||
L2 | 0-3 | 4-7 | 8-11 | 12-15 | 16-19 | ||||||
L1 | 0-1 | 2-3 | 4-5 | 6-7 | 8-9 | 10-11 | 12-13 | 14-15 | 16-17 | 18-19 | 20-21 |