A reader, October 12, 2004 - 8:59 am UTC
Kiril
A reader, October 12, 2004 - 10:38 am UTC
Thanks Tom for promp answer.
I think in my case alter table t move is more acceptable. After that I have to rebuild only PK, but this is table with old data and there in no way to fall PK rebuild.
October 12, 2004 - 10:41 am UTC
<quote>
but this is table with old data and there in no way to fall PK rebuild.
</quote>
??? huh?
rebuild
Kiril, October 12, 2004 - 10:52 am UTC
Tom,
In this table we are storing data from previous year and there is no insert , delete or update on this table, only Select.
Hence rebuild of inedex and add PK is only time consumeing procedure.
rebuild indexes
Sean, October 12, 2004 - 3:38 pm UTC
Hi Tom,
After I moved the table to new tablespace, I need to rebuild index.
Do I have to issue rebuild index one by one such as this one:
alter index index_name rebuid;
Or there is the command which will rebuild all indexes on the table at once, something like:
alter table table_name rebuild index;
Thanks so much for your help.
Sean
October 12, 2004 - 3:56 pm UTC
you have to enter the individual commands -- they can be done "in parallel" by opening many sqlplus sessions and running one in each -- but you are rebuilding an "index", not the "indexes on a table".
you can easily automate this:
begin
for x in (select * from user_indexes where status = 'UNUSABLE')
loop
execute immediate 'alter index ' || x.index_name || ' rebuild';
end loop;
end;
/