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: Rebuild Index

Re: Rebuild Index

From: Dave Wotton <Dave.Wotton_at_it.camcnty.no-spam.gov.uk>
Date: 1998/03/27
Message-ID: <6fgr4f$296@dns.camcnty.gov.uk>#1/1

Vincent Birlouez <birlouezv_at_logica.com> wrote:
>Hi,
>
>I would like to rebuild some indexes (and keep the current storage
>parameters), there is two way (in Oracle 7.3) for doing that :
>
>1. Drop the index
> Recreate the index
>
>2. Rebuild the index (ALTER INDEX myindex REBUILD)
>
>
>Are those two ways rebuild the index in the same fashion or is there
>some differences ?
>

There are differences.

Rebuild the index works faster because it builds the new index from the contents of the old, rather than needing to re-read the data rows.

It also means that people can continue to use the old index during the rebuild process ( although they won't be able to update ).

ALTER INDEX ... REBUILD will need enough free space to be able to have both the new index and the old one present at the same time, as the old index is only removed once the new one has been built.

ALTER INDEX ... REBUILD will create the new index in your default tablespace, using the default tablespace space parameters, unless you provide tablespace and space parameters when you rebuild.

ALTER INDEX ... REBUILD also analyses your index when it rebuilds it.

Dave.

-- 

To reply by email, remove the "no-spam" bit from my email address.
Received on Fri Mar 27 1998 - 00:00:00 CST

Original text of this message

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