mysql 对数据表已有表进行分区表
程序员文章站
2024-03-09 09:51:53
...
Range分区:
ALTER TABLE `t_user` PARTITION BY RANGE(id)(
PARTITION p0 VALUES LESS THAN (5000001) ENGINE = INNODB,
PARTITION p1 VALUES LESS THAN (10000001) ENGINE = INNODB,
PARTITION p2 VALUES LESS THAN (15000001) ENGINE = INNODB,
PARTITION p3 VALUES LESS THAN (20000001) ENGINE = INNODB,
PARTITION p4 VALUES LESS THAN (25000001) ENGINE = INNODB,
PARTITION p5 VALUES LESS THAN (30000001) ENGINE = INNODB,
PARTITION p6 VALUES LESS THAN (35000001) ENGINE = INNODB,
PARTITION p7 VALUES LESS THAN (40000001) ENGINE = INNODB,
PARTITION p_catachall VALUES LESS THAN MAXVALUE);