停止空想

老张的空中之家

Histogram 在9i的缺点

作者:admin 发表时间:六月 - 5 - 2006

柱状图的作用和收集的方法我在 Block Selectivity and Row Selectivity 这篇文章里面提到过一些。

如果使用了一般的统计信息,比如

exec dbms_stats.gather_table_stats (‘user’,’tab’) ;

这时并没有对indexed columns进行数据逻辑分布的柱状图分析,可以通过user_tab_col_statistics的num_buckes列来验证,这时该列为1,也就是说没有柱状图。 如果在这个列上面值很多的话,可能也只存储最大最小值,然后根据该列上值的distinct多少来取平均。比如下面的这个例子

id value  Row selectivity (pr)  Block selectivity (pb)

01               89.87%              100%

02                2.34%                7%

03                2.16%                6%

04                1.86%                2%

05                1.42%                1%

06                1.17%                1%

07                0.75%                1%

08                0.18%                < 1%

09                0.14%                < 1%

10                0.11%                < 1%

TOTAL          100.00%              N/A

  阅读全文 »

Popularity: 25% [?]

类别:Oracle