Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie Index Question
In article <7k2s9k$ngm$1_at_nnrp1.deja.com>,
dipenk_at_my-deja.com wrote:
> IS it possible to rebuild an index that is a
> primary key? I have an index that has a lot of
> deleted rows when I validate its structure and I
> want to rebuild it. Can I do this simply using the
> REBUILD command?
>
> Thanks in Advance.
>
> Dipen Kotecha
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Greetings, Dipen,
Yes, I rebuild primary key indexes all the time with the REBUILD option; you just have to make sure there's enough space in the index tablespace for the rebuild.
If you're on UNIX, here's a little script I wrote to rebuild an index; it prompts you for the information:
spool rebindx.lst
alter index &iname rebuild
storage (
initial &init
next &next
maxextents 249 (assumes a 4K database)
pctincrease 0);
tablespace &tsname;
commit;
spool off
The script is invoked in SQL*Plus by: @rebindx
Take care.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri Jun 18 1999 - 14:13:39 CDT
![]() |
![]() |