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: analyze script

Re: analyze script

From: Brian Peasland <oracle_dba_at_remove_spam.peasland.com>
Date: Wed, 16 Apr 2003 18:52:58 GMT
Message-ID: <3E9DA68A.8A73696C@remove_spam.peasland.com>


If one is going to use GATHER_SCHEMA_STATS, then one should look at only gather stats on stale, or new objects. This saves on tons of work and can leave your system resources for more important things.

HTH,
Brian

Norman Dunbar wrote:
>
> Morning Hegyvari,
>
> if you are runniing on Unix then set up a cron job as follows :
>
> 00 06 * * 2 su - unix_user -c "sqlplus oracle_user/password
> @scripts/analyse_schema QASL_REG"
>
> for which you will need a script called analyse_schema.sql, located in
> the scripts directory of the appropriate unix_user :
>
> BEGIN
> DBMS_STATS.GATHER_SCHEMA_STATS (
> ownname => '&1',
> DEGREE => 4,
> CASCADE => TRUE);
> END;
> /
>
> The first parameter on the command line, QASL_REG above, is the schema
> name which is to be analysed. You could, if you so desired, set this up
> as a DBMS_JOB and let the database run it periodically.
>
> Of course, analysing (with or without a 'Z') is a fairly intensive
> operation and should really only be carried out whenever it needs to be.
> Just analysing for the sake of it causes a lot of work on the database
> and may not return any decent results in the end. See some of Howards
> previous posts on Google Groups for valid reasons.
>
> Regards,
> Norman.
>
> -------------------------------------
> Norman Dunbar
> Database/Unix administrator
> Lynx Financial Systems Ltd.
> mailto:Norman.Dunbar_at_LFS.co.uk
> Tel: 0113 289 6265
> Fax: 0113 289 3146
> URL: http://www.Lynx-FS.com
> -------------------------------------
Received on Wed Apr 16 2003 - 13:52:58 CDT

Original text of this message

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