252.Which three are the valid statements in relation to SQL plan baselines? (Choose three.)
A. The plans can be manually loaded to the SQL plan baseline.
B. The plans in the SQL plan baseline are verified and accepted plans.
C. The plans generated for every SQL statement are stored in the SQL plan baseline by default.
D. The plan baselines are stored temporarily in the memory as long as the database instance is running.
E. For the SQL plan baselines to be accessible to the optimizer, the SYSAUX tablespace must be online.
Answer: ABE
答案解析:
参考:http://docs.oracle.com/cd/E11882_01/server.112/e41573/optplanmgmt.htm#PFGRF95122
15.2.1 Capturing SQL Plan Baselines
During the SQL plan baseline capture phase, the database detects plan changes and records the new plan so that it can be evolved (verified) by the database administrator. To this end, the database maintains a plan history for individual SQL statements. Because ad hoc SQL statements do not repeat and thus do not suffer performance degradation, the database maintains plan history only for repeatable SQL statements.
To recognize repeatable SQL statements, the database maintains a statement log that contains the SQL ID of various SQL statements that the optimizer has evaluated. The database recognizes a SQL statement as repeatable when it is parsed or executed again after it has been logged.
For each repeatable SQL statement, the database maintains a plan history that contains all plans generated by the optimizer. The set of all accepted plans in the plan history is the SQL plan baseline.
You can configure the SQL Plan Baseline Capture phase for automatic capture of plan history and SQL plan baselines for repeatable SQL statements. Alternatively, you can manually load plans as SQL plan baselines.
15.6 SQL Management Base
The SQL management base (SMB) is a part of the data dictionary that resides in the SYSAUX
tablespace. It stores statement logs, plan histories, SQL plan baselines,
and SQL profiles. To allow weekly purging of unused plans and logs, the SMB uses automatic space management.
You can also add plans manually to the SMB for a set of SQL statements. This feature is especially useful when upgrading the database from a version before Oracle Database 11g because it helps to minimize plan regressions resulting from the use of a new optimizer version.
Because the SMB is located entirely within SYSAUX
, the database does not use SQL plan management and SQL tuning features when this tablespace is unavailable.