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

本站中文解释

及用途

Oracle的视图DBA_HIST_BASELINE视图显示当前活动的所有基线的信息。它主要用于收集和跟踪定期在数据库上运行的SQL和AWR快照之间的差异。它可以帮助数据库管理员了解数据库结构和SQL查询性能的变化情况。

DBA_HIST_BASELINE视图中包含的字段,如下:
– BASELINE_ID: 基线ID
– BASELINE_NAME:基线名称
– BASELINE_TYPE:基线类型,有可能是SYSTEM_TIME或者SYSTEM_CHANGE_NUMBER
– BEGIN_INTERVAL_TIME:BEGIN记录的开始时间
– END_INTERVAL_TIME:END记录的结束时间
– SCN_NUMBER:BEGIN记录的系统改变号的编号
– \_IDENTIFIER:标识基线的唯一标识符
– ENABLE:是否启用基线
– PERIOD:基线的建立周期

使用方法:为了评估性能变化,可以使用DBA_HIST_BASELINE视图去查看历史基线,并做性能分析,并可以修改查询方式和SQL语句去优化性能。

官方英文解释

DBA_HIST_BASELINE displays information on baselines taken in the system.

For each baseline, this view displays the complete time range and whether the baseline is the default baseline.

Column Datatype NULL Description

DBID

NUMBER

Database ID

BASELINE_ID

NUMBER

Internal ID for the baseline

BASELINE_NAME

VARCHAR2(64)

User-specified name for the baseline

BASELINE_TYPE

VARCHAR2(13)

The baseline type, as follows:

STATIC – baselines that are created manually by the user

MOVING WINDOW – baselines that have dynamic start and end snapshot IDs

GENERATED – baselines that are automatically generated by the system, using a template

START_SNAP_ID

NUMBER

Start snapshot ID for the baseline

START_SNAP_TIME

TIMESTAMP(3)

Time associated with the start snapshot ID

END_SNAP_ID

NUMBER

End snapshot ID for the baseline

END_SNAP_TIME

TIMESTAMP(3)

Time associated with the end snapshot ID

MOVING_WINDOW_SIZE

NUMBER

If BASELINE_TYPE is MOVING WINDOW, this field is the size of the moving window in number of days.

If NULL, then the window size is the value of the AWR retention setting.

CREATION_TIME

DATE

Time the baseline was created

EXPIRATION

NUMBER

How long to keep the baseline, in number of days. A NULL value means that the baseline will be kept forever.

TEMPLATE_NAME

VARCHAR2(64)

Name of the template that created this baseline, if any.

LAST_TIME_COMPUTED

DATE

Last time that statistics were computed on the baseline.

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


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