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: Rebuilding an index

Re: Rebuilding an index

From: CSI <mail34067_at_pop.net>
Date: 1997/03/18
Message-ID: <01bc33d7$6a0db640$1118ced0@Proj-del7>#1/1

> Gentlemen:
>
> Here is my situation
>
> I have a badly fragmented INDEX object
>
> I am going to drop it
> I am going to recreate it using one single extent (storage INITIAL ????)
>
> My question is :
>
> How do I go about finding how big to make this first INITIAL extent ??
> Are there any other implications, such as enough space in the TABLESPACE
 ??
>
> Thank you
>
> Carlos

Hi Carlos,

Use the new REBUILD INDEX feature available with 7.3. Just make sure you have enough temp space.

The following script generates SQL for 'alter index' based on current storage requirements. It allocates all the needed space in INITIAL itself and makes NEXT as half of INITIAL. You may change these the way you want it.

select ' alter index ' || segment_name
|| ' rebuild storage ( initial ' || bytes/1024 || 'K next ' || bytes/2048 || 'K pctincrease 0 ) ;' AlterIndex from dba_segments
where segment_name = '&INDEX_NAME'

-ram Received on Tue Mar 18 1997 - 00:00:00 CST

Original text of this message

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