Oracle 视图 DBA_OPTSTAT_OPERATIONS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle的视图DBA_OPTSTAT_OPERATIONS用来显示有关当前优化器统计操作的详细信息。视图中的数据可帮助DBA诊断当前的优化器统计操作,如改变表空间使用,合并索引,分析表等。视图DBA_OPTSTAT_OPERATIONS中包含以下字段:

•OPERATION_NAME:此操作的类型,该列指定了发生的具体操作。

•STEP:这是表示优化器统计操作执行顺序的顺序号列。

•STATUS:这一列指示当前操作是成功完成还是失败。

•START_TIME:此操作开始执行的时间。

•END_TIME:此操作完成的时间。

•DETAILS:关于此操作的额外详细信息。

为了使用DBA_OPTSTAT_OPERATIONS视图,您需要以SELECT_CATALOG_ROLE角色的权限连接到Oracle数据库。

要检索关于当前优化器统计操作的信息,可以执行以下查询:

SELECT * FROM dba_optstat_operations;

这将显示当前优化器统计操作的所有信息。

官方英文解释

DBA_OPTSTAT_OPERATIONS contains a history of statistics operations performed at the schema and database level using the DBMS_STATS package.

Column Datatype NULL Description

ID

NUMBER

Internal ID of the statistics operation

OPERATION

VARCHAR2(64)

Operation name

TARGET

VARCHAR2(64)

Target on which the operation was performed

START_TIME

TIMESTAMP(6) WITH TIME ZONE

Time at which the operation started

END_TIME

TIMESTAMP(6) WITH TIME ZONE

Time at which the operation ended

STATUS

VARCHAR2(49)

Current operation status. Possible values are:

  • IN PROGRESS: Operation is currently running

  • COMPLETED: Operation has completed successfully

  • FAILED: Operation has failed

  • TIMED OUT: Maintenance window was not enough to complete this operation (applies only to automatic statistics gathering)

JOB_NAME

VARCHAR2(32)

Name of the scheduler job that executes this operation (for example, a user scheduled statistics gathering job)

SESSION_ID

NUMBER

ID of the session in which this operation is invoked

NOTES

VARCHAR2(4000)

Notes about the operation, such as a failure message for operations with status FAILED

See Also:

  • “DBA_OPTSTAT_OPERATION_TASKS”

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_STATS package

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_REPAIR.ADMIN_TABLES procedure

  • Oracle Database PL/SQL
    Packages and Types Reference
    for more information about the DBMS_REPAIR.DUMP_ORPHAN_KEYS procedure


数据运维技术 » Oracle 视图 DBA_OPTSTAT_OPERATIONS 官方解释,作用,如何使用详细说明