Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> analyze partitioned indexes
Hi,
I want to write a procedure that analyzes all my indexes. But I'm not sure whether my source code will also analyze partitioned indexes. What I'm doing is:
delete from admin.tb_index_stats
where index_owner = '&1';
commit;
FOR EACH_ROW IN (SELECT OWNER || '.' || INDEX_NAME as INDEX_NAME
FROM DBA_INDEXES WHERE OWNER = '&1') LOOP
BEGIN EXECUTE IMMEDIATE 'ANALYZE INDEX ' || t_tables(i) || ' VALIDATE STRUCTURE';
Will this also work for all the partitions in a partitioned index?
Or what would be a way to get all the index partitions and analyze them separately?
This is 8.1.7 on Sun Solaris.
Thanks,
Helmut
Received on Wed Oct 24 2001 - 04:18:16 CDT
![]() |
![]() |