时间:2021-07-01 10:21:17 帮助过:27人阅读
顺便贴上10个level的动态采样介绍
Level 0: Do not use dynamic sampling.
Level
1: Sample all tables that have not been analyzed if the following
criteria are met: (1) there is at least 1 unanalyzed table in the query;
(2) this unanalyzed table is joined to another table or appears in a
subquery or non-mergeable view; (3) this unanalyzed table has no
indexes; (4) this unanalyzed table has more blocks than the number of
blocks that would be used for dynamic sampling of this table. The number
of blocks sampled is the default number of dynamic sampling blocks
(32).
Level 2: Apply dynamic sampling to
all unanalyzed tables. The number of blocks sampled is two times the
default number of dynamic sampling blocks.
Level
3: Apply dynamic sampling to all tables that meet Level 2 criteria,
plus all tables for which standard selectivity estimation used a guess
for some predicate that is a potential dynamic sampling predicate. The
number of blocks sampled is the default number of dynamic sampling
blocks. For unanalyzed tables, the number of blocks sampled is two times
the default number of dynamic sampling blocks.
Level
4: Apply dynamic sampling to all tables that meet Level 3 criteria,
plus all tables that have single-table predicates that reference 2 or
more columns. The number of blocks sampled is the default number of
dynamic sampling blocks. For unanalyzed tables, the number of blocks
sampled is two times the default number of dynamic sampling blocks.
Levels
5, 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.
Level 10: Apply dynamic sampling to all tables that meet the Level 9 criteria using all blocks in the table.
ORACLE 收集统计信息
标签:hidden packages 安装oracle 创建 全局 ini asc 批量操作 previous