看到这样一段话:
Correlation between columns in the same table always causes problems if those columns appear together in your where clause; the issue is not restricted to indexes. Sometimes you will be able to work around the problem by using the optimizer_dynamic_sampling parameter, or the dynamic_sampling hint (both of which appeared at some stage in 9i) to instruct Oracle to take a run-time sample of 32 or more blocks fromcritical tables to see what fraction of the rows matches your where clause.
同表中相关联的2个列,也会导致CBO计算错误,所以要使用dynamic_sampling这个参数,下面转一篇介绍这个参数的文章
dynamic_sampling也可作为一个hint:
select
/*+ index(t1) dynamic_sampling(t1 1) */
small_vc
from
t1
where
ind_pad = rpad('x',40)
and n1 = 2
and n2 = 2
;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11517198/viewspace-609280/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/11517198/viewspace-609280/