053第246题
2015-07-12 12:34
387 查看
246.The OPTIMIZER_USE_PLAN_BASELINES parameter is set to TRUE. The optimizer generates a
plan for a SQL statement but does not find a matching plan in the SQL plan baseline.
Which two operations are performed by the optimizer in this scenario? (Choose two.)
A. The optimizer adds the new plan to the plan history.
B. The optimizer selects the new plan for the execution of the SQL statement.
C. The optimizer adds the new plan to the SQL plan baseline as an accepted plan.
D. The optimizer adds the new plan to the SQL plan baseline but not in the ENABLED state.
E. The optimizer costs each of the accepted plans in the SQL plan baseline and picks the one with the
lowest cost.
Answer: AE
The plan history is the set of plans, both accepted and not accepted, that the optimizer generates for a SQL statement over time. Because only accepted plans are in the SQL plan baseline, the plans in the baseline
form a susbset of the plan history. For example, after the optimizer generates the first acceptable plan for a SQL plan baseline, subsequent plans are part of the plan history but not part of the plan baseline.
The process of adding plans to a SQL plan baseline is plan evolution. To be eligible to be evolved, a plan must be enabled for use by the optimizer.
During the SQL plan baseline selection phase, Oracle Database detects plan changes
based on the stored plan history, and selects plans to avoid potential performance regressions for a set of SQL statements.
Each time the database compiles a SQL statement, the optimizer does the following:
Uses a cost-based search method to build a best-cost plan
Tries to find a matching plan in the SQL plan baseline
Does either of the following depending on whether a match is found:
If found, then the optimizer proceeds using the matched plan
If not found, then the optimizer evaluates the cost of each accepted plan in the SQL plan baseline and selects the plan with the lowest cost
The best-cost plan found by the optimizer that does not match any plans in the plan history for the SQL statement represents a new plan. The database adds this plan as a nonaccepted plan to the plan history. The database does not use the new
plan until it is verified to not cause a performance regression. However, if a change in the system (such as a dropped index) causes all accepted plans to become non-reproducible, then the optimizer selects the best-cost plan. Thus, the presence of a SQL plan
baseline causes the optimizer to use conservative plan selection strategy for the SQL statement.
To enable the use of SQL plan baselines, set the
parameter to
plan for a SQL statement but does not find a matching plan in the SQL plan baseline.
Which two operations are performed by the optimizer in this scenario? (Choose two.)
A. The optimizer adds the new plan to the plan history.
B. The optimizer selects the new plan for the execution of the SQL statement.
C. The optimizer adds the new plan to the SQL plan baseline as an accepted plan.
D. The optimizer adds the new plan to the SQL plan baseline but not in the ENABLED state.
E. The optimizer costs each of the accepted plans in the SQL plan baseline and picks the one with the
lowest cost.
Answer: AE
The plan history is the set of plans, both accepted and not accepted, that the optimizer generates for a SQL statement over time. Because only accepted plans are in the SQL plan baseline, the plans in the baseline
form a susbset of the plan history. For example, after the optimizer generates the first acceptable plan for a SQL plan baseline, subsequent plans are part of the plan history but not part of the plan baseline.
The process of adding plans to a SQL plan baseline is plan evolution. To be eligible to be evolved, a plan must be enabled for use by the optimizer.
During the SQL plan baseline selection phase, Oracle Database detects plan changes
based on the stored plan history, and selects plans to avoid potential performance regressions for a set of SQL statements.
Each time the database compiles a SQL statement, the optimizer does the following:
Uses a cost-based search method to build a best-cost plan
Tries to find a matching plan in the SQL plan baseline
Does either of the following depending on whether a match is found:
If found, then the optimizer proceeds using the matched plan
If not found, then the optimizer evaluates the cost of each accepted plan in the SQL plan baseline and selects the plan with the lowest cost
The best-cost plan found by the optimizer that does not match any plans in the plan history for the SQL statement represents a new plan. The database adds this plan as a nonaccepted plan to the plan history. The database does not use the new
plan until it is verified to not cause a performance regression. However, if a change in the system (such as a dropped index) causes all accepted plans to become non-reproducible, then the optimizer selects the best-cost plan. Thus, the presence of a SQL plan
baseline causes the optimizer to use conservative plan selection strategy for the SQL statement.
To enable the use of SQL plan baselines, set the
OPTIMIZER_USE_SQL_PLAN_BASELINESinitialization
parameter to
TRUE(default).
相关文章推荐
- 发现有的时候,EBS会报连接数不足的问题
- 排序优化
- OCP 【11g新特性】sec_max_failed_login_attempts
- Oracle 11g 在线重定义
- Oracle大数据量分区后查询效率低下
- 使用datapump 导出导入同义词
- Oracle Tablespace Transportation
- PL/SQL“ ORA-14551: 无法在查询中执行 DML 操作”解决
- 从节能角度看数据中心软硬件设计(一)
- ocp认证详细介绍
- Oracle OCP 认证有什么价值
- 关于decode参数类型
- Oracle 10g Transparent Data Encryption examples
- Oracle 11gOCP 053 v12.02 1--300题疑问答案更正
- Oracle 11gOCP 053 v12.02 300--600题部分疑问答案更正
- 11gOCP 考试文档整理
- OCP 051 第156题 order by 与 union
- ocp 051 第64题,有关order by 的试验
- 题解053-425(V13.02版本,711题)
- 题解053-427(V13.02版本,711题)