Best Method to Gather Stats of Partition Tables When Using Granularity

(Doc ID 2352723.1)

Last updated on JANUARY 31, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Information in this document applies to any platform.

Goal

What is the best option when using granularity:

1. exec dbms_stats.gather_table_stats(ownname=>'IBM',tabname=>'dm_sku_partition_stg',GRANULARITY => 'PARTITION',estimate_percent=>dbms_stats.auto_sample_size,cascade=>true);
Or
2. exec dbms_stats.gather_table_stats(ownname=>'IBM',tabname=>'dm_sku_partition_stg',GRANULARITY=>'GLOBAL AND PARTITION',estimate_percent=>dbms_stats.auto_sample_size,cascade=>true,degree=>8);


 

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