Oracle 视图 DBA_ADVISOR_SQLSTATS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图DBA_ADVISOR_SQLSTATS显示SQL优化器性能统计信息,可用于发现SQL优化器中的性能问题,并做出改进措施。它使用静态变量来保存特定的优化者行为,其中包括给定的SQL的次数,执行次数,优化次数,最小执行时间,最大执行时间,平均执行时间,平均优化时间,缓冲区命中次数,直接I/O次数,CPU使用等等。要使用这个视图,可以使用如下语句:
SELECT * FROM dba_advisor_sqlstats;
这将返回用于该步骤的SQL的统计数据的完整列表。另外,也可以使用WHERE子句来缩小结果集,使用AND条件来定位来自特定操作的SQL。
官方英文解释
DBA_ADVISOR_SQLSTATS
displays execution statistics for the test-execution of different SQL plans during the advisor analysis.
Related View
USER_ADVISOR_SQLSTATS
displays execution statistics owned by the current user for the test-execution of different SQL plans during the advisor analysis.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Advisor task name in which the SQL statement was executed (see |
|
|
|
|
Advisor task ID in which the SQL statement was executed (see |
|
|
|
Advisor task execution in which the SQL statement was executed (see |
|
|
Type of the advisor task execution in which the SQL statement was executed (see |
|
|
|
|
Advisor object ID identifying the relevant SQL statement (see |
|
|
|
Plan ID number generated to uniquely identify a plan for a particular SQL statement (foreign key to |
|
|
|
Identifier for the SQL statement executed |
|
|
|
Hash value of the SQL execution plan |
|
|
For internal use only |
|
|
|
The database ID of the pluggable database (PDB) |
|
|
|
Parse time (in microseconds) measured for the SQL |
|
|
|
Elapsed time (in microseconds) to execute the SQL and fetch all of its rows, after parsing |
|
|
|
CPU time (in microseconds) to execute the SQL and fetch all of its rows, after parsing |
|
|
|
I/O time (in microseconds) to execute the SQL and fetch all of its rows, after parsing |
|
|
|
Number of buffer gets measured for executing the SQL and fetching all of its rows |
|
|
|
Number of disk reads measured for executing the SQL and fetching all of its rows |
|
|
|
Number of direct writes measured for executing the SQL and fetching all of its rows |
|
|
|
Number of physical read I/O requests issued by the monitored SQL |
|
|
|
Number of physical write I/O requests issued by the monitored SQL |
|
|
|
Number of bytes read from disks by the monitored SQL |
|
|
|
Number of bytes written to disks by the monitored SQL |
|
|
|
Number of rows returned by the SQL execution |
|
|
|
Number of fetches for the SQL execution |
|
|
|
Execution count for the SQL. This column will always have a value of |
|
|
|
Indicates whether the SQL was executed to end-of-fetch ( |
|
|
|
Optimizer cost for the execution plan |
|
|
|
For internal use only |
|
|
|
Total number of executions during test execute |
|
|
|
Number of I/O bytes exchanged between Oracle Database and the storage system |
|
|
|
Indicates whether the first execution in test execute is ignored ( |
|
|
|
The database ID of the PDB |
|
|
|
For internal use only |
|
|
|
For internal use only |
|
|
|
The total of the db block gets from cache statistic and the consistent gets from cache statistic |
|
|
|
The total of the db block gets direct statistic and the consistent gets direct statistic |
|
|
|
Number of original executions from the SQL tuning set, independent of trial executions |
|
|
|
Value of the flags from the execution of the SQL, such as timeout or error |
See Also:
-
“USER_ADVISOR_SQLSTATS”
-
“Statistics Descriptions” for more information about statistics