CREATE TABLE `fenqu` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`dt` int(11) NOT NULL,
`data` int(11) DEFAULT NULL,
PRIMARY KEY (`id`, `dt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 PARTITION by list(dt)( PARTITION p20170519 VALUES IN (20170519) DATA DIRECTORY = '/tmp/request_visit' ENGINE = InnoDB,PARTITION p20170520 VALUES IN (20170520) DATA DIRECTORY = '/tmp/request_visit' ENGINE = InnoDB);
alter table fenqu add partition (PARTITION p20170521 VALUES IN (20170521) DATA DIRECTORY = '/tmp/request_visit')
alter table fenqu drop partition p20170520,p20170521
删除分区会删除该分区数据
partition mysql分区
最新推荐文章于 2024-05-05 13:31:50 发布