Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

does existing user and new connection affect when we rebuild a index ?

vishal patelOct 30 2008 — edited Oct 30 2008
Hi
All,

I have oracle 10.2.0.3 on AIX 5.2

does existing user and new connection affect when we rebuild a index?

Thanks,
Vishal

Comments

Aman....
does existing user and new connection affect when we rebuild a index?

What kind of efect you are mentioning?
Aman....
Anand...
Hii..

let me try to answer your query, it might not be 100% correct.
When you rebuild the index using ONLINE clause then, the copy of the index is maintained which is modified and then replaces the old index and by the time the new one is rebuilt the older one is used by the users.Whereas, when you simply do , alter index indexname rebuild; the index goes into unusable state and will not be available to the users.If the index which is going to be rebuilt is already being used by someone then you will get ORA error sayin RESOURCE BUSY WAIT...

Anand
26741
1. A REBUILD locks the table (the table can still be queried). A REBUILD ONLINE allows operations to run concurrently against the table.

2. You run the risk of ORA-01410 errors. For a good explanation see http://jonathanlewis.wordpress.com/2007/09/16/index-rebuild/

3. In 10g and above a REBUILD implicitly updates statistics on the Index. This can change execution plans as Oracle parses SQL statements that execute after the REBUILD.

But, generically, existing user connections and user queries are NOT affected by a rebuild.


Hemant K Chitale
http://hemantoracledba.blogspot.com
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 27 2008
Added on Oct 30 2008
3 comments
205 views