Forum Stats

  • 3,780,652 Users
  • 2,254,421 Discussions
  • 7,879,408 Comments

Discussions

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

vishal patel
vishal patel Member Posts: 368
edited Oct 30, 2008 12:38AM in General Database Discussions
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
Tagged:

Answers

  • Aman....
    Aman.... Member Posts: 22,913 Gold Crown
    does existing user and new connection affect when we rebuild a index?

    What kind of efect you are mentioning?
    Aman....
  • Anand...
    Anand... Member Posts: 3,590
    edited Oct 30, 2008 12:38AM
    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
    26741 Member Posts: 4,923 Gold Trophy
    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
This discussion has been closed.