Helmut, have you tried your code, that would be the best way to see if it works(hint: partitioned indexes work pretty much like normal indexes, in that you can analyze the table and the indexes will be analyzed also, including partitioned tables/indexes).
joe > "Daiminger, Helmut" wrote: > > 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 > t_tables(t_tables.COUNT + 1) := EACH_ROW.INDEX_NAME; > END LOOP; > > FOR i IN 1 .. t_tables.COUNT 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 -- Joe Testa Performing Remote DBA Services, need some backup DBA support? For Sale: Oracle-dba.com domain, its not going cheap but feel free to ask :) IM: n8xcthome or joen8xct -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Joe Testa INET: [EMAIL PROTECTED] Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
