ITPub博客

首页 > 数据库 > Oracle > Oracle OCP 1Z0 053 Q246(SQL Plan Baselines)

Oracle OCP 1Z0 053 Q246(SQL Plan Baselines)

原创 Oracle 作者:abstractcyj 时间:2016-04-05 14:59:21 0 删除 编辑
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

参考:http://blog.csdn.net/jgmydsai/article/details/38555635
http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95115

15.2.2 Selecting SQL Plan Baselines

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:

  1. Uses a cost-based search method to build a best-cost plan

  2. Tries to find a matching plan in the SQL plan baseline

  3. 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


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8520577/viewspace-2075534/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
曾从事java方向开发多年。近年已经转入数据库方向。主要擅长SQL优化,Oracle数据库问题诊断,Oracle备份与恢复等。服务于医药物流,医院等行业

注册时间:2010-01-26

  • 博文量
    555
  • 访问量
    837571