当前位置: 代码迷 >> 综合 >> MyCat 增加分区
  详细解决方案

MyCat 增加分区

热度:91   发布时间:2024-01-24 13:37:16.0

ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION 分区名称 VALUES LESS THAN ('分区值'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200201 VALUES LESS THAN ('2020-03-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200401 VALUES LESS THAN ('2020-04-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200501 VALUES LESS THAN ('2020-05-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200601 VALUES LESS THAN ('2020-06-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200701 VALUES LESS THAN ('2020-07-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200801 VALUES LESS THAN ('2020-08-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20200901 VALUES LESS THAN ('2020-09-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20201001 VALUES LESS THAN ('2020-10-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20201101 VALUES LESS THAN ('2020-11-01'));
ALTER TABLE awsm_forward_treaty ADD PARTITION (PARTITION p20201201 VALUES LESS THAN ('2020-12-01'));