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 11.1.0.6 to 11.1.0.7 [Release 11.1]
Information in this document applies to any platform.

Symptoms

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
*/to_char(count("C1")),to_char(substrb(dump(min("C1"),16,0,32),1,120)),
to_char(substrb(dump(max("C1"),16,0,32),1,120))
from
"SCOTT"."S" t where TBL$OR$IDX$PART$NUM("SCOTT"."S",0,4,0,"ROWID") = :objn
/* NDV,NIL,NIL*/

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

Cause

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