| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Rebuilding an index
> 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
![]() |
![]() |