Data Partitioning

Tables can be merged into one virtual Merge Table to provide data partitioning. Optionally the merge table can have a table partitioning scheme allowing data to be partitioned automatically by column or expression and on distinct values or value ranges upon insert. The partitioning schemes are stored in below system tables:

sys.table_partitions

nametypereferencesdescription
"id"INTEGERThe unique internal identifier for the table partition.
"table_id"INTEGERsys.tables.idThe merge table id this partition belongs to.
"column_id"INTEGERsys.columns.idThe merge table's column id by which the partitioning data is selected OR null when an expression is used.
"expression"VARCHARThe merge table's expression by which the partitioning data is selected OR null when a column is used.
"type"INTEGERThe partitioning type: 5=By Column Range, 6=By Expression Range, 9=By Column Value, 10=By Expression Value.

sys.range_partitions

nametypereferencesdescription
"table_id"INTEGERsys.tables.idThe partition table id this partition belongs to.
"partition_id"INTEGERsys.table_partitions.idThe merge table's partition id this range partition belongs to.
"minimum"VARCHARThe minimum value of the range. Can be null when WITH NULL VALUES is specified.
"maximum"VARCHARThe maximum value of the range. Can be null when WITH NULL VALUES is specified.
"with_nulls"BOOLEANWhether this range also include the NULLs of the Column/Expression.

sys.value_partitions

nametypereferencesdescription
"table_id"INTEGERsys.tables.idThe partition table id this partition belongs to.
"partition_id"INTEGERsys.table_partitions.idThe merge table's partition id this value partition belongs to.
"value"VARCHARThe partitioning value. Can be null when WITH NULL VALUES is specified.