Re: Will statistics overwrite histograms?
From: Riyaj Shamsudeen <riyaj.shamsudeen_at_gmail.com>
Date: Mon, 5 Jan 2009 10:55:31 -0600
Message-ID: <203315c10901050855q36e2e75bh4ebd4f4787bcb6a9_at_mail.gmail.com>
Dennis
FOR ALL COLUMNS SIZE AUTO For e.g.
Date: Mon, 5 Jan 2009 10:55:31 -0600
Message-ID: <203315c10901050855q36e2e75bh4ebd4f4787bcb6a9_at_mail.gmail.com>
Dennis
That depends upon the value of method_opt default. If you want to keep histograms, you might want to set default value for method_opt to use REPEAT clause. Default is 'for all columns size auto', which may not keep histograms.
SQL> select dbms_stats.get_param('METHOD_OPT') from dual;
DBMS_STATS.GET_PARAM('METHOD_OPT')
FOR ALL COLUMNS SIZE AUTO For e.g.
begin
dbms_stats.set_param( 'METHOD_OPT','FOR ALL COLUMNS SIZE REPEAT');
end;
/
-- Cheers Riyaj Shamsudeen Principal DBA, Ora!nternals - http://www.orainternals.com Specialists in Performance, Recovery and EBS11i Blog: http://orainternals.wordpress.com On Mon, Jan 5, 2009 at 6:33 AM, Dennis Williams < oracledba.williams_at_gmail.com> wrote:Received on Mon Jan 05 2009 - 10:55:31 CST
> List,
>
> Stupid question on statistics. Oracle 10.2.0.4. Added some histograms to
> fix some query problems. If statistics are refreshed on this table (the
> regular nightly job), will the histograms get overwritten? Do I need to lock
> statistics on this table?
>
> Happy New Year everyone.
>
> Dennis Williams
>
-- http://www.freelists.org/webpage/oracle-l