mysql分区管理

1.mysql5.5增加关键字columns

作用:

2.对一个不是分区表的数据库表追加分区方法:

 

ALTER TABLE test_load_888_20110428 
PARTITION BY RANGE COLUMNS(datatime)(
PARTITION p1 VALUES LESS THAN ('2011-12-06 00:00:00'),
PARTITION p0 VALUES LESS THAN (maxvalue)
)

 删除分区:

 

ALTER TABLE test_load_888_20110428 DROP PARTITION p0;

 添加分区:

ALTER TABLE test_load_888_20110428 ADD PARTITION (
PARTITION p0 VALUES LESS THAN (maxvalue)
)

 第二种方式:

ALTER TABLE test_load_bus_20110428 REORGANIZE PARTITION p0 INTO (
PARTITION p2 VALUES LESS THAN ('2011-12-07 00:00:00'),
PARTITION p0 VALUES LESS THAN (maxvalue)
);

 

 

 

 

 

 

 

 

 

 

 

 

 

 

你可能感兴趣的:(mysql)