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

Home -> Community -> Usenet -> c.d.o.server -> Re: Question about Oracle Indexes

Re: Question about Oracle Indexes

From: Howard J. Rogers <howardjr_at_www.com>
Date: Wed, 7 Nov 2001 05:45:38 +1100
Message-ID: <3be82fc6$0$382$afc38c87@news.optusnet.com.au>


You're getting deletes confused with updates. Deletes *do* get the relevant index entry deleted, but an update to a table does not result in an update to the index entry (because, chances are, that would leave an index entry in entirely the wrong leaf node -imagine updating 'Bob' to 'Robert' for example, you'd have a leaf node containing the entries "Adam Robert Charles David Ed...", which would be all wrong).

So updates instead result in the entry for "Bob" being *marked* for deletion, and the insertion of an entirely new entry for Robert. And not until that leaf node has all its entries marked for deletion do we actually clear out the block involved.

But yes, rebuilds clean out all 'marked for deletion' entries.

Regards
HJR

--

Oracle Resources : http://www.hjrdba.com
=============================


"waltervdv" <marcus.kuehl_at_t-online.de> wrote in message
news:b2677297.0111050606.24d5f3f5_at_posting.google.com...

> Hallo !
>
> Is it true that Oracle (8i) does not remove dependent index-entries
> when a row in a table is deleted and that the only way to remove
> entries in an index is to rebuild the index ("alter index xyz
> rebuild")?
>
>
> Thanks ,
>
> Marcus
Received on Tue Nov 06 2001 - 12:45:38 CST

Original text of this message

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