欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

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);
相关标签: Mysql