Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamically update statistic for an db instance
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.deReceived on Wed Mar 18 1998 - 00:00:00 CST