Oracle 视图 DBA_HIST_SYSMETRIC_HISTORY 官方解释,作用,如何使用详细说明
本站中文解释
Oracle 视图 DBA_HIST_SYSMETRIC_HISTORY 是诊断性指标历史表。它用于跟踪近期系统指标活动,可以发现数据库中发生的问题,并进行诊断和优化。该视图可以帮助用户确定当前或过去某个时间点的操作状态,识别系统历史指标是否和它们应该处于的正常性状态相匹配。
使用 DBA_HIST_SYSMETRIC_HISTORY 视图可以查看特定系统指标的历史波动趋势,比如 CPU 负载,缓存命中率等。它还可以帮助检测出数据库的行为异常,以及帮助识别数据库性能瓶颈。另外,它还可以用来帮助监测系统运行趋势,诊断性能问题并提出优化建议。
使用此视图可以通过以下方式来获取诊断性指标的历史记录:
— 查看指定 MEATRIC 指标的最近 24 小时内的数据
SELECT timestamp, value
FROM dba_hist_sysmetric_history
WHERE metric_name = ‘CPU Usage Per Sec’
AND interval_length_minutes = 5
AND timestamp > SYSTIMESTAMP – INTERVAL ‘1’ DAY;
— 查看某段时间内指定 MEATRIC 指标的波动趋势
SELECT timestamp, value
FROM dba_hist_sysmetric_history
WHERE metric_name = ‘CPU Usage Per Sec’
AND interval_length_minutes = 5
AND timestamp > ‘2019-02-01’
AND timestamp
官方英文解释
DBA_HIST_SYSMETRIC_HISTORY
externalizes all available history of the system metric values for the entire set of data kept in the database.
This view contains snapshots of V$SYSMETRIC_HISTORY
.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
|
Unique snapshot ID |
|
|
|
Database ID for the snapshot |
|
|
|
Instance number for the snapshot |
|
|
|
Begin time of the interval |
|
|
|
End time of the interval |
|
|
|
Interval size (in hundredths of a second) |
|
|
|
Group ID |
|
|
|
Metric ID |
|
|
|
Metric name |
|
|
|
Metric Value |
|
|
|
Unit of measurement |
|
|
The database ID of the PDB for the sampled session |
|
|
|
The ID of the container that
|
See Also:
-
“V$SYSMETRIC_HISTORY”
-
“DBA_HIST_CON_SYSMETRIC_HIST”
-
“V$CON_SYSMETRIC_HISTORY”