Oracle 视图 DBA_SQL_PLAN_BASELINES 官方解释,作用,如何使用详细说明
本站中文解释
Oracle 视图 DBA_SQL_PLAN_BASELINES 提供了存储在重复创建及执行 SQL 语句所被指定的优化计划的视图。它会存储多种类型的计划,包括优化器可接受的计划、仓库使用(控制台)、现场 Cursor 以及强制计划等等。
使用 Oracle 视图 DBA_SQL_PLAN_BASELINES 可以检查特定的 SQL 语句的 SQL 优化程序的基准,并可以查看何种优化计划在被实现时呗执行。此视图还可以让 DBA 监控和改善 SQL 的性能,从而确保 SQL 的执行总是正确的。
使用 Oracle 视图 DBA_SQL_PLAN_BASELINES 的语法为:
SELECT * FROM dba_sql_plan_baselines;
此外,DBA 还可以使用以下语句确定特定查询的计划:
SELECT * FROM dba_sql_plan_baselines WHERE sql_handle = ‘<SQL_Handle>;
官方英文解释
DBA_SQL_PLAN_BASELINES
displays information about the SQL plan baselines currently created for specific SQL statements.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Unique SQL identifier generated from normalized SQL text |
|
|
|
Unique SQL identifier in string form as a search key |
|
|
|
Un-normalized SQL text |
|
|
|
Unique plan identifier in string form as a search key |
|
|
User who created the plan baseline |
|
|
|
How the plan baseline was created:
|
|
|
|
Name of the parsing schema |
|
|
|
Text description provided for the plan baseline |
|
|
|
Database version at the time of plan baseline creation |
|
|
|
|
Timestamp when the plan baseline was created |
|
|
Timestamp when the plan baseline was last modified |
|
|
|
Timestamp when the plan baseline was last executed Note: For performance reasons, this column is not updated immediately after each execution of the plan baseline. Therefore, the plan baseline may have been executed more recently than the value of this column indicates. |
|
|
|
Timestamp when the plan baseline was last verified |
|
|
|
Indicates whether the plan baseline is enabled ( |
|
|
|
Indicates whether the plan baseline is accepted ( |
|
|
|
Indicates whether the plan baseline is fixed ( |
|
|
|
Indicates whether the optimizer was able to reproduce the plan ( |
|
|
|
Indicates whether the plan baseline is auto-purged ( |
|
|
|
Indicates whether a plan that is automatically captured by SQL plan management is marked adaptive or not. When a new adaptive plan is found for a SQL statement that has an existing SQL plan baseline, that new plan will be added to the SQL plan baseline as an unaccepted plan, and the |
|
|
|
Optimizer cost at the time the plan baseline was created |
|
|
|
Application module name |
|
|
|
Application action |
|
|
|
Number of executions at the time the plan baseline was created |
|
|
|
Total elapsed time (in microseconds) at the time the plan baseline was created |
|
|
|
Total CPU time (in microseconds) at the time the plan baseline was created |
|
|
|
Total buffer gets at the time the plan baseline was created |
|
|
|
Total disk reads at the time the plan baseline was created |
|
|
|
Total direct writes at the time the plan baseline was created |
|
|
|
Total rows processed at the time the plan baseline was created |
|
|
|
Total number of fetches at the time the plan baseline was created |
|
|
|
Total number of full fetches at the time the plan baseline was created |
Footnote 1
If the value of the ORIGIN
column is equal to AUTO-CAPTURE
, then data for this column is not populated.
See Also:
-
Oracle Database SQL Tuning
Guide for more information about SQL plan baselines -
The
DBMS_SQLTUNE
package in Oracle Database PL/SQL
Packages and Types Reference