📅  最后修改于: 2022-03-11 15:05:27.799000             🧑  作者: Mango
ALTER TABLE t1
PARTITION BY RANGE( MONTH(FROM_UNIXTIME(transaction_date) )
SUBPARTITION BY HASH( DAY(FROM_UNIXTIME(transaction_date)) )
SUBPARTITIONS 31 (
PARTITION p0 VALUES LESS THAN (2),
PARTITION p1 VALUES LESS THAN (3),
PARTITION p2 VALUES LESS THAN (4),
PARTITION p3 VALUES LESS THAN (5),
PARTITION p4 VALUES LESS THAN (6),
PARTITION p5 VALUES LESS THAN (7),
PARTITION p6 VALUES LESS THAN (8),
PARTITION p7 VALUES LESS THAN (9),
PARTITION p8 VALUES LESS THAN (10),
PARTITION p9 VALUES LESS THAN (11),
PARTITION p10 VALUES LESS THAN (12),
PARTITION p11 VALUES LESS THAN MAXVALUE
);