0
我有一个MySQL表,它的分区看起来如下MySQL的 - 分区之间移动数据又名重新分区
p2015h1 - Contains data where date < 2015-07-01 (Has data from 2016-06-01. Hence only month worth of data)
p2015h2 - Contains data where date < 2016-01-01
p2016h1 - Contains data where date < 2016-07-01
p2016h2 - Contains data where date < 2017-01-01
我想新的分区,以每季度基于如下 -
p0 - Contains data where date < 2015-10-01
p1 - Contains data where date < 2016-01-01
p2 - Contains data where date < 2016-04-01
p3 - Contains data where date < 2016-07-01
我开始通过重组第一个分区&执行下面的命令。一切顺利。
alter table `table1` reorganize partition `p2015half1` into (partition `p0` values less than ('2015-10-01'));
现在,作为现有的分区p2015h2
有包括高达2015-10-01
数据的数据,我怎么可能动这部分进入分区p0
?当我继续构建新的分区时,我需要对其他分区也做同样的事情。
我曾尝试在桌子上全面清除分区,但是,该表是数十亿行的大小&因此操作将需要数天时间。发布后,我将不得不重建分区,这将需要几天。因此,我决定采取拆分分区的方法。
我被困在这个时间点。请在这里完全欣赏任何指导。