ITPub博客

首页 > Linux操作系统 > Linux操作系统 > optimizer_dynamic_sampling

optimizer_dynamic_sampling

原创 Linux操作系统 作者:casper0511 时间:2009-07-15 23:29:56 0 删除 编辑
看到这样一段话:
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这个参数,下面转一篇介绍这个参数的文章

http://space.itpub.net/35489/viewspace-592375


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/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-12-08

  • 博文量
    34
  • 访问量
    69440