Index rebuilding in parallel, what could go wrong?


I have one table tab1 as mentioned below

SQL> desc tab1;
Name Null? Type
—————————————– ——– —————————-
ID NUMBER
C1 VARCHAR2(100)
C2 VARCHAR2(200)

SQL> create index idx_tab1 on tab1(ID);

Index created.

SQL> alter index idx_tab1 rebuild parallel 4;

Index altered.

SQL> select degree from dba_indexes where index_name=’IDX_TAB1′;

DEGREE
—————————————-
4

NOTE: Index rebuilding in parallel changes the degree permanently .SO NEXT time  it will use the index with parallel degree of 4, which could lead to high CPU utilization. So we can change it to avoid any unexpected problem..

SQL> alter index idx_tab1 parallel 1;

Index altered.

SQL> select degree from dba_indexes where index_name=’IDX_TAB1′;

DEGREE
—————————————-
1

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s