我试图将分区添加到我创建的表中。我想把它划分为" PARTITION GRP"并按月分组。但我不知道如何在子分区内编写INTERVAL子句。 有人可以帮我吗?谢谢!
PARTITION BY RANGE (PARTITION_GRP)
SUBPARTITION BY RANGE (RPTG_MTH_DATE)
INTERVAL(NUMTOYMINTERVAL(1,'MONTH'))
(
PARTITION PG_0 VALUES LESS THAN (1)
(SUBPARTITION PG_0_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_1 VALUES LESS THAN (2)
(SUBPARTITION PG_1_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_2 VALUES LESS THAN (3)
(SUBPARTITION PG_2_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_3 VALUES LESS THAN (4)
(SUBPARTITION PG_3_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY'))),
PARTITION PG_4 VALUES LESS THAN (MAXVALUE)
(SUBPARTITION PG_4_201401 VALUES LESS THAN (TO_DATE('1-FEB-2014', 'DD-MON-YYYY')))
)
答案 0 :(得分:6)
间隔分区的限制
INTERVAL条款受以下限制:
- 您只能指定一个分区键列,且必须为NUMBER或DATE类型。
- 索引组织表不支持此子句。
- 您无法在区间分区表上创建域索引。
- 子分区级别不支持间隔分区。 ...
所以你不能进行间隔子分区。