Friday, February 23, 2007

Create index -- Parallel Option Syntax

SQL> create table t as select * from all_objects where rownum < 20;

Table created.

SQL> create index owner_idx on t(owner)
2 parallel (degree 8)
3 ;

Index created.

SQL> select index_name, degree from user_indexes where index_name='OWNER_%';

no rows selected

SQL> select index_name, degree from user_indexes;

INDEX_NAME DEGREE
------------------------------ ----------------------------------------
OWNER_IDX 8
SYS_C006454 1
SYS_C006455 1

SQL> alter index OWNER_IDX parallel (degree 1);

Index altered.

SQL> select index_name, degree from user_indexes;

INDEX_NAME DEGREE
------------------------------ ----------------------------------------
OWNER_IDX 1
SYS_C006454 1
SYS_C006455 1

No comments: