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: Dynamically update statistic for an db instance

Re: Dynamically update statistic for an db instance

From: Geir Warhaug <Geir.Warhaug_at_alcatel.no>
Date: 1998/03/19
Message-ID: <3510BB61.2F1C@alcatel.no>#1/1

Thanks a lot, this was just what I was looking for!

Geir Warhaug

Matthias Gresz wrote:
>
> On Tue, 17 Mar 1998 14:58:43 +0100, Geir Warhaug <Geir.Warhaug_at_alcatel.no> wrote:
> Hi,
>
> try:
>
> set head off pages 0 feed off
> spool t.sql
> select 'analyze table' || owner || '.' ||table_name||' COMPUTE statistics;'
> from all_tables
> union all
> select 'analyze index' || owner || '.' ||index_name||' COMPUTE statistics;'
> from all_indexes
> /
> spool off
> spool analyze.log
> set termout on
> set echo on
> @t.sql;
> spool off
>
> >Does somebody have a script that updates the statistic (ANALYZE) for
> >every table in the db instance? I need a bourne shell script...
> >
> >Thanks in advance!
> >
> >Geir Warhaug
>
> --
>
> Regards
>
> Matthias Gresz :-)
>
> GreMa_at_T-online.de
  Received on Thu Mar 19 1998 - 00:00:00 CST

Original text of this message

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