Re: Usage of the dbms_stats.gather_database_stats() procedure

  • From: Anand Rao <panandrao@xxxxxxxxx>
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 14 Feb 2006 10:09:26 +0530

Hi,

Just like to add that,

1) Gather histograms only if you are using literal SQL. i.e, if you are
using Bind Variables in your queries, then it doesn't make much sense to
gather histograms because CBO will NOT use it after the first lookup.

2) Why don't you use degree=>n in your gather_table_stats or
gather_index_stats? that can help run your stats gathering faster. If you
have lots of CPUs then you should utilise atleast 70% of it for gathering
stats during the weekends.

3) spawn multiple gather_table_stats jobs and see how it runs.

regards
anand

On 14/02/06, Jared Still <jkstill@xxxxxxxxx> wrote:
>
>
>
> On 2/13/06, Orr, Steve <sorr@xxxxxxxxxxxx> wrote:
> >
> > Any other stats maintenance recommendations?
> >
>
> Consider using block_sample => true.
>
> Otherwise your samples may read much more of the database than you
> intended.
>
> --
> Jared Still
> Certifiable Oracle DBA and Part Time Perl Evangelist
>

Other related posts: