深入学习Oracle分区表及分区索引(2)-创建range分区
本文向读者介绍了如果创建range分区的方法。
可以看出,local索引的分区完全继承表的分区的属性,包括分区类型,分区的范围值即不需指定也不能更改,这就是前面说的:local索引的分区维护完全依赖于其索引所在表。
不过呢分区名称,以及分区所在表空间等信息是可以自定义的,例如:
| SQL> create index IDX_PART_RANGE_ID ON T_PARTITION_RANGE(id) local ( 2 partition i_range_p1 tablespace tbspart01, 3 partition i_range_p2 tablespace tbspart01, 4 partition i_range_p3 tablespace tbspart02, 5 partition i_range_pmax tablespace tbspart02 6 ); |
索引已创建。
| SQL> select index_name, partitioning_type, partition_count
2 From user_part_indexes 3 where index_name = 'IDX_PART_RANGE_ID';
------------------------------ ------- --------------- IDX_PART_RANGE_ID RANGE 4
2 from user_ind_partitions 3 where index_name = 'IDX_PART_RANGE_ID' 4 order by partition_position;
--------------- --------------- -------------------- I_RANGE_P1 10 TBSPART01 I_RANGE_P2 20 TBSPART01 I_RANGE_P3 30 TBSPART02 I_RANGE_PMAX MAXVALUE TBSPART02 |
- 本文关键词:

