我必须按日期范围划分几个表。我是否必须删除主表或重新加载完整数据才能对这些表进行分区?
有些表确实包含超过 5000 万行。
alter table temp_table_test1
partition by range (unix_timestamp(created_at))
(
partition p01 values less than (unix_timestamp('2015-02-01')),
partition p02 values less than (unix_timestamp('2015-02-01')),
partition p03 values less than (unix_timestamp('2015-02-01')),
partition p04 values less than (unix_timestamp('2015-02-01')),
partition p02 values less than (maxvalue)
);
这是我正在使用的脚本。