Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: index rebuilding...
Ryan wrote:
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message > news:v3ghe8qj8vstf4_at_corp.supernews.com... >
> > segment_name >
> > > I could have swarn I read something either in Tom Kyte's book or on his site > stating that rebuilding indexes is a bad idea? I saw something about how an > index will eventually get to a state of equilibrium and you may experience > slowdowns while it reestablishes that equilibrium. > > you know any documentation on this? about when to rebuild indices and such? > >
select 'alter index <OWNER>.'||segment_name||
' rebuild tablespace INDEX storage(initial '||round(bytes/1024)||
'K next '||round(next_extent/1024)||'K pctincrease 0);'
from dba_segments
where owner = '<OWNER>'
and tablespace_name not like '%INDEX%'
and segment_type = 'INDEX'
This moved the index to the correct tablespace, and set the initial extent to the size of the index in K, and next_extent to what it already was set at, next I will find all of the indexes that have a pctincrease > 0 and adjust accordingly, and I think I should be able to use this same script to modify the storage for all the indexes with out-to-lunch storage settings by modifying the next_extent clause to a standard size of 1M or 5M.
Still like to hear opinions if there is a better way to do this....
TIA Received on Wed Jan 29 2003 - 16:48:05 CST