Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: analyze partitioned indexes

Re: analyze partitioned indexes

From: Joe Testa <teci_at_the-testas.net>
Date: Wed, 24 Oct 2001 03:16:26 -0700
Message-ID: <F001.003B2D49.20011024031523@fatcity.com>

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: teci_at_the-testas.net

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: ListGuru_at_fatcity.com (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).
Received on Wed Oct 24 2001 - 05:16:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US