Suboptimal Query when Gather Partition Stats on Reference Partitioned Table

(Doc ID 761333.1)

Last updated on MAY 12, 2017

Applies to:

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


Collecting stats on a partitioned table takes a long time.

Analyzing 10046 trace output, we can see for each partition there is a select similar to:

select /*+ full(t) no_parallel(t) no_parallel_index(t) dbms_stats
cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
"SCOTT"."S" t where TBL$OR$IDX$PART$NUM("SCOTT"."S",0,4,0,"ROWID") = :objn

TBL$OR$IDX$PART$NUM is the key part to look at.


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