我想在下表中添加第三个分区。 例如,如何为每个week_of_sale分区添加子分区“item_of_sale”?虽然我可以索引第三个变量,但按此变量进行分区应该有更好的性能。
alter table MyTable
PARTITION BY RANGE( YEAR_of_Sales )
SUBPARTITION BY HASH(Week_Of_Sales)
SUBPARTITIONS 52 (
PARTITION p2012 VALUES LESS THAN (2013),
PARTITION p2013 VALUES LESS THAN (2014),
PARTITION p2014 VALUES LESS THAN (2015),
PARTITION p2015 VALUES LESS THAN (2016),
PARTITION p2016 VALUES LESS THAN (2017),
PARTITION p2017 VALUES LESS THAN (2018),
PARTITION p2018 VALUES LESS THAN (2019)
PARTITION pmax VALUES LESS THAN MAXVALUE
);