示例2:全局分区索引,只支持Range 分区和Hash 分区:
(1)创建2个测试分区表:
sql> create table pdba (id number, time date) partition by range (time)
2 (
3 partition p1 values less than (to_date('2010-10-1', 'yyyy-mm-dd')),
4 partition p2 values less than (to_date('2010-11-1', 'yyyy-mm-dd')),
5 partition p3 values less than (to_date('2010-12-1', 'yyyy-mm-dd')),
6 partition p4 values less than (maxvalue));
表已创建。
SQL> create table Thash
2 (id number primary key,
4 item_id number(8) not null)
6 partition by hash(id)
7 (
8 partition part_01,
9 partition part_02,
10 partition part_03 );
表已创建。
(2)创建分区索引
示例2:全局分区索引
SQL> create index i_id_global on PDBA(id) global
2 partition by range(id)
3 (partition p1 values less than (200),
4 partition p2 values less than (maxvalue) );
索引已创建。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12961536/viewspace-769487/
,如需转载,请注明出处,否则将追究法律责任。