2012-08-07

why oracle is not using my index

see also http://richardfoote.wordpress.com/2009/06/09/the-cbo-and-indexes-an-introduction-absolute-beginners/

basic index range scan cost = index blevel + ceil(index selectivity x leaf blocks) + ceil(table selectivity x clustering factor)


In order to have a lower cost for index scans, usually is good to change/lower the clustering factor for an index
exemple :

 exec dbms_stats.set_index_stats (ownname=>'OWNER_XXX',indname=>'INDEX_IDX',clstfct=>10);


Niciun comentariu:

Trimiteți un comentariu