oracleindexingpartitioning

Is the default oracle index global or local


When I create an index on an oracle table and just specify column name and table name (basically a default index), does it create a global index or a local partitioned index (i.e the index is partitioned according to the table partitions)?


Solution

  • create table T_Test
    (
      pk_test number(10),
      val     number(10)
    )
    partition by hash (val)
    (
      partition p1,
      partition p2,
      partition p3
    
    );
    
    insert into t_test values (1,3);
    insert into t_test values (2,2);
    insert into t_test values (3,5);
    insert into t_test values (5,6);
    insert into t_test values (6,7);
    insert into t_test values (7,4);
    
    commit;
    
    create index ix_test on t_test(val);
    
    select partitioned from user_indexes where index_name = 'IX_TEST';
    >> NO
    

    So by default, an index will be created as a global index.