Automatic Optimizer Statistics Collection on Partitioned Table (Doc ID 1592404.1)

Last updated on MAY 22, 2016

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.2 to 11.2.0.4 [Release 11.2]
Information in this document applies to any platform.

Goal

This article explains what type of statistics are collected on partitioned tables and when by Automatic Optimizer Statistics Collection job, that by default is running in the maintenance window.

As it is documented in the Oracle® Database Performance Tuning Guide 11g Release:

Automatic optimizer statistics collection calls the DBMS_STATS.GATHER_DATABASE_STATS_JOB_PROC procedure. This internal procedure operates similarly to the DBMS_STATS.GATHER_DATABASE_STATS procedure using the GATHER AUTO option. The main difference is that GATHER_DATABASE_STATS_JOB_PROC prioritizes database objects that require statistics, so that objects that most need updated statistics are processed first, before the maintenance window closes.

To demonstrate the behaviour we use the DBMS_STATS.GATHER_DATABASE_STATS procedure using the GATHER AUTO option in the example below.

The following holds when the default parameters for gathering statistics are not changed.

 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms