using INTERVAL (NUMTOYMINTERVAL (1,'MONTH') in SUBPARTITION

你离开我真会死。 提交于 2019-12-24 00:18:55

问题


I'm trying to add partitions to a table I created. I want it partitioned on "PARTITION GRP" and subpartitioned by month. But I don't know how to write the INTERVAL clause inside a subpartition. Can someone help me on this? thanks!

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')))
 ) 

回答1:


From the documentation:

Restrictions on Interval Partitioning
The INTERVAL clause is subject to the following restrictions:

  • You can specify only one partitioning key column, and it must be of NUMBER or DATE type.
  • This clause is not supported for index-organized tables.
  • You cannot create a domain index on an interval-partitioned table.
  • Interval partitioning is not supported at the subpartition level. ...

So you can't have interval subpartitioning.



来源:https://stackoverflow.com/questions/26808000/using-interval-numtoyminterval-1-month-in-subpartition

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!