|
参数optimizer_dynamic_sampling用于控制动态采样的级别,10g中默认为2,9.2.0为1,以下版本为0,它的最高级别为10。 Level 0: Perform no dynamic sampling at all.------不进行动态采样 Level 1: Sample tables that appear in join or sub-query conditions that have no indexes and have more blocks than 32 (the default for dynamic sampling)------被采样的表必须满足以下条件:被采样的表必须出现在join或者子查询中,并且没有索引,而且blocks必须大于32(默认采样数) Level 2: Dynamically sample all unanalyzed tables that have more than 32 blocks.------采样block数大于32并且没有被分析的表 Level 3: Dynamic samples tables using a single column that applies selectivity to the table being sampled in addition to the level 2 rules.------应用level2的规则,并且在单列上应用选择性规则检查 Level 4: Dynamic samples tables using 2 or more columns that applies selectivity to the table being sampled in addition to the level 3 rules.------应用level3的规则,并且在2列,或者多余2列上应用选择性规则检查 Level 5: Dynamic samples up to 64 blocks on tables using level 4 rules. The table of course has to be larger than 64 blocks in size (2 times the default sampling size).------应用level4的规则,并且被采样的表的block数必须大于64,同时抽取64个block采样 Level 6: Dynamic samples up to 128 blocks on tables using level 4 rules. The table, of course, has to be larger than 128 blocks in size (4 times the default sampling size).------应用level4的规则,并且被采样的表的block数必须大于128,同时抽取128个block采样 Level 7: Dynamic samples up to 256 blocks on tables using level 4 rules. The table, of course, has to be larger than 256 blocks in size (8 times the default sampling size).-------应用level4的规则,并且被采样的表的block数必须大于256,同时抽取256个block采样 Level 8: Dynamic samples up to 1024 blocks on tables using level 4 rules. The table, of course, has to be larger than 1024 blocks in size (32 times the default sampling size).-------应用level4的规则,并且被采样的表的block数必须大于1024,同时抽取1024个block采样 Level 9: Dynamic samples up to 4096 blocks on tables using level 4 rules. The table has to be larger than 4096 blocks in size (128 times the default sampling size).-------应用level4的规则,并且被采样的表的block数必须大于4096,同时抽取4096个block采样 Level 10: Dynamic sampling of all blocks on tables using level 4 rules-------应用level4的规则,并且抽取所有的blocks进行采样(责任编辑:OracleTT) |

