Re: Analyze

From: Ronald <ronr_at_wxs.nl>
Date: 1998/10/08
Message-ID: <01HW.B242DDA3000A2325020AF420_at_news.wxs.nl>#1/1


On Thu, 8 Oct 1998 7:36:22 +0200, sooz wrote (in message <361C4F56.75656B9B_at_pobox.com>):
>
> Josef Huber wrote:

>> 
>> Hello, 
>> 
[Quoted] >> 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

How about
exec dbms_utility.analyze_schema ('schema_name','(COMPUTE|ESTIMATE)'); ?

-- 
Ronald

---------------------------------------------------------------------------
mailto:ronr_at_wxs.nl
http://home.wxs.nl/~ronr/RonR.html (last update: june 8th, 1998)
http://www.maccentral.com/news/9804/migration.shtml (forward migration home)

The best way to accelerate a machine running windows is at 9.8 m/s^2
Received on Thu Oct 08 1998 - 00:00:00 CEST

Original text of this message