Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Gather Statistics(Granularity=>Global) Behaviour

3401813Feb 21 2017 — edited Feb 21 2017

According to the oracle the below example will gather on the global level.

exec dbms_stats.gather_table_stats( Owname=>'SH', Tabname=>'SALES', Partname=>'23_MAY_2008', Granularity=>Global);

exec dbms_stats.gather_table_stats(ownname=>'SH', tabname=>'SALES', cascade=>true, granularity=>'GLOBAL', degree=>21);

I did a test on inserting into temp table with interval partition setup and execute above command right after.

I noticed that partition level was also being gathered where Granularity was set to Global.

It seems to be confusing what is the backend logic that Oracle do when setting to Granularity=>Global.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2017
Added on Feb 21 2017
10 comments
5,124 views