My Oracle Support Banner

Index Full Scan used for DBMS_STATS Query even though there is a INDEX_FFS hint in Query (Doc ID 1073987.1)

Last updated on FEBRUARY 14, 2020

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 11.1 to 11.2]
Oracle Database - Enterprise Edition - Version to [Release 12.1]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Information in this document applies to any platform.
***Checked for relevance on 25-Jan-2012***

NOTE: In the images and/or the document content below, the user information and data used represents fictitious data .Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.


When gathering stats on indexes like below, some indexes take an extreme amount of time for statistics to be gathered.

dbms_stats.gather_index_stats(ownname => '',indname => '<index>',granularity
=> 'AUTO',estimate_percent => dbms_stats.AUTO_SAMPLE_SIZE,degree => 1);

The time can be seen to be taken in queries of the form

select /*+ no_parallel_index(t, "IREQ_REQ_TYPE_ID") dbms_stats
cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring
no_expand index_ffs(t,"IREQ_REQ_TYPE_ID") */ count(*) as nrw,count(distinct
sys_op_lbid(76767565,'L',t.rowid)) as nlb,count(distinct
hextoraw(sys_op_descend("REQ_TYPE_ID")||sys_op_descend("DATE_OF_REQ"))) as
ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as clf
from "CRM"."REQUEST" sample block ( .0647241806,1) t
where ("REQ_TYPE_ID" is not null or "DATE_OF_REQ" is not null)
and (TBL$OR$IDX$PART$NUM("CRM"."REQUEST",0,4,0,"ROWID") = :objn);

Even though there is a index_ffs hint, INDEX FULL SCAN is used on the index.
For other indexes where the query runs faster , FAST FULL SCAN is indeed used.




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

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