Re: Analyze

From: sooz <sooz_at_pobox.com>
Date: 1998/10/07
Message-ID: <361C4F56.75656B9B_at_pobox.com>#1/1


Josef Huber wrote:
>
> Hello,
>
> Is there a command with that i can analyze a entire schema ?

[Quoted] [Quoted] Not that I know of ... but there is this:

set heading off
set pages 999
set feedback off
spool analyze_all.sql
[Quoted] 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 Wed Oct 07 1998 - 00:00:00 CEST

Original text of this message