关于动态抽样(DynamicSampling)(三)

2015-01-27 22:37:29 · 作者: · 浏览: 76
, 6, 7, 8, and 9: Apply dynamic sampling to all tables that meet the previous level criteria using 2, 4, 8, 32, or 128 times the default number of dynamic sampling blocks respectively.
5,6,7,8,9级在4级基础上分别使用2,4,8,32,128倍于默认动态采样数据块数量。


7)Level 10: Apply dynamic sampling to all tables that meet the Level 9 criteria using all blocks in the table.
10级:在9级基础上对表中所有数据块进行采样。


5、什么时候适合采用动态采样?


这是一个狡猾的问题,没有一定使用经验,还真不好意思说。
通常:
1)我们使用3和4级进行动态采样。
2)如果我们SQL的解析时间很快但是执行时间巨慢,可以考虑使用动态采样。典型的就是数据仓库 系统
3)OLTP系统中都是一个SQL重复执行,解析和执行都在瞬息之间,所以不建议使用高级别的动态采样。这会给SQL带来硬解析消耗。
这个时候可以考虑SQL Profile,你可以理解为“静态采样”。