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: how to create dbms_stast.gather_table_stats script

Re: how to create dbms_stast.gather_table_stats script

From: Ethan Post <nospam_at_nowhere.com>
Date: Sat, 24 Aug 2002 04:02:37 GMT
Message-ID: <xzD99.141855$983.219158@rwcrnsc53>


Sybrand,

One valid reason for a "fancy" script that I can think of is simply having the ability to run a stats collection process for a specified interval or to have the ability to easily cancel the process. For example "gather stats each night for 1 hour" or "quit stats collection if I execute blah command".

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message news:4rsbmu4m5b148lajda9ke933kms58sqanb_at_4ax.com...
> On Fri, 23 Aug 2002 09:57:28 +0200, "M.a.x G.e.decke"
> <spam_at_gedecke.de> wrote:
>
> >thanx very much, but you weren't very helpful. the problem still exists.
i'm
> >already trying to get this to work for some time now and i'm hangin at
the
> >moment...
> >
> >
> >max
> >
> The advice is correct though.
> A lookup in the mentioned manual would have learned that there is
> dbms_stats.gather_schema_stats
> No need to build a fancy sql script.
> And if you insist on building in a fancy sql script
> you'd better write an anonymous pl/sql block
>
> begin
> for tablist in (select table_name from user_tables) loop
> dbms_stats.gather_schema_stats(ownnname=>user,tablist.table_name);
> end loop;
> end;
> /
>
> and again that there is all to it.
> The purpose of this newsgroup is as far as I am concerned to learn you
> to do your work, rather than to do your work for you, for free.
>
> Regards
>
>
> Sybrand Bakker, Senior Oracle DBA
>
> To reply remove -verwijderdit from my e-mail address
Received on Fri Aug 23 2002 - 23:02:37 CDT

Original text of this message

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