Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: online index rebuilds

RE: online index rebuilds

From: Mark W. Farnham <mwf_at_rsiz.com>
Date: Thu, 26 Jan 2006 02:40:53 -0500
Message-ID: <KNEIIDHFLNJDHOOCFCDKCECMHJAA.mwf@rsiz.com>

You mean other than having to do an at best order n log n operation to create the index instead of reading the index in order so the order of the operation is merely n, and the overhead of absorbing dynamic changes to the table and resultant changes into the index being built?

As to the "WHY?" question, I'm not sure, but my guess would be that they believed the process flow of managing the changes while the new indexes was being built were more reliable that way.

Circa May 1991 the level of difficulty of getting the code provably correct to read the existing index to create the new index without locks was referred to by a guy who thought he might have to write it as "Jesus code," meaning no disrespect, but the notion that it would require a divine being to get it right.

Some alternate psuedo code to read the index to build the new index while locking only handfulls of blocks worth of rows at a time must not have made the cut, or was lost in the shuffle.

Probably the advantage of the full table scan is getting a handle on which rows need fixup in the new index image from the read consistent read to fix it up to the current committed image before you swap it in place.

I'm just guessing here.

mwf

 -----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Roger Xu
Sent: Wednesday, January 25, 2006 3:05 PM To: joseph_at_amalrajinc.com; Bobak, Mark; ORACLE-L Cc: tanel.poder.003_at_mail.ee
Subject: online index rebuilds

  Any other differences besides: 1) does not lock the table; 2) does a full table scan instead of full index scan; ?

    -----Original Message-----
    From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Joseph Amalraj

    Sent: Tuesday, January 24, 2006 9:48 AM     To: Bobak, Mark; joseph_at_amalrajinc.com; ORACLE-L     Subject: RE: ORA-01652: unable to extend temp segment

    Thanks,

    Had read the article, but I am interested as to why Oracle is doing a full table scan instead of full index scan for online index rebuilds.

     <snip>

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Jan 26 2006 - 01:40:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US