My Oracle Support Banner

Best Method to Gather Stats of Partition Tables When Using Granularity (Doc ID 2352723.1)

Last updated on MARCH 10, 2023

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.4 and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A 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

To view full details, sign in with your My Oracle Support account.

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


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.