自动分区表

网上有很多按日期自动分区表的,这里说的是按记录数自动分区,比如:100W一个分区。


code:

create table Student
(
  PK_ID  Integer,
  Name   VARCHAR(18),
  Age    Integer
)
partition by range(PK_ID)
interval (1000000)
(
  partition INIT_PAR values less than(1000000)
);

说明:
1.interval()间隔函数;
2.按记录数分区时,分区列应该是Number类型。


其它部分同日期分区,大家可以在网上找,有很多详细的文章,相同部分不再赘述。

猜你喜欢

转载自shishouxing.iteye.com/blog/1935213