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: Matthias Gresz <GreMa_at_t-online.de>
Date: 1998/03/18
Message-ID: <6eoh5p$lm5$3@news01.btx.dtag.de>#1/1

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 Wed Mar 18 1998 - 00:00:00 CST

Original text of this message

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