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

Home -> Community -> Usenet -> c.d.o.server -> Re: Analyze

Re: Analyze

From: Yves Gauthier <YGauthier_at_cegep-fxg.qc.ca>
Date: Thu, 08 Oct 1998 12:08:01 GMT
Message-ID: <361CAB99.16BDAC77@cegep-fxg.qc.ca>


You can use "execute dbms_utility.analyze_schema(''SCHEMA'',''COMPUTE'');" in a SQL+ script

Hope this help!

sooz wrote:

> Josef Huber wrote:
> >
> > Hello,
> >
> > Is there a command with that i can analyze a entire schema ?
>
> Not that I know of ... but there is this:
>
> set heading off
> set pages 999
> set feedback off
> spool analyze_all.sql
> select 'analyze '||segment_type||' '||owner||'.'||segment_name||
> ' compute statistics;'
> from dba_segments
> where segment_type in ('TABLE','INDEX','CLUSTER')
> /
> spool off;
>
> You can change the 'compute statistics' to any other valid clause in the
> ANALYZE statement. This is generally the method used to do "mass"
> changes, that is create the SQL from the data dictionary itself.
>
> Now just run that ... it creates the analyze statements for the entire
> schema, well at least those segments that can be analyzed. Then you
> just need to run the analyze_all.sql script.
>
> Good luck.
> - sooz
Received on Thu Oct 08 1998 - 07:08:01 CDT

Original text of this message

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