忘了说请教了,请教各位大虾

解决方案 »

  1.   

    分区索引 
      create index employee_deptno on employee(deptno) 
      local ( 
      partition part1 tablespace part1_ndx_ts, 
      partition part2 tablespace part2_ndx_ts, 
      partition part3 tablespace part3_ndx_ts, 
      partition part4 tablespace part4_ndx_ts, 
      ); 
      当分区中出现许多事务并且要保证所有分区中的数据记录的唯一性时采用全局索引,如: 
      create index employee_deptno on employee(deptno) 
      global partition by range (deptno) 
      ( 
      partition part1 values less than (11) 
      tablespace part1_ndx_ts, 
      partition part2 values less than (21) 
      tablespace part2_ndx_ts, 
      partition part3 values less than (31) 
      tablespace part3_ndx_ts 
      partition part4 values less than (maxvalue) 
      tablespace part4_ndx_ts 
      ); 
      在建立全局索引时,global子句允许指定索引的范围值,这个范围值可以不同于表分区的范围值。只有建立局部索引才会使索引索引分区与表分区间建立起一一对应关系。因此,在大多数情况下,应该使用局部索引分区。若使用了此索引,分区就能够很容易地将索引分区与表分区建立关联,局部索引比全局索引更易于管理。 一个是分区索引,一个是全局索引