1、dba_hist_sys_time_model 视图应用
DBA_HIST_SYS_TIME_MODEL displays historical system time model statistics.
This view contains snapshots of V$SYS_TIME_MODEL 视图的信息其实对应的 AWR 的 Time
Model Statistics,比如我们可以通过这个视图来查看每个 snapshot 的 db time、硬解析、解析、解
析错误、sql 执行时间、序列加载时间、连接数据库的时间、rman 备份恢复时间占据具体时间等
SQL> select distinct stat_name from dba_hist_sys_time_model order by stat_name;
STAT_NAME
----------------------------------------------------------------
DB CPU
DB time
Java execution elapsed time
OLAP engine CPU time
OLAP engine elapsed time
PL/SQL compilation elapsed time
PL/SQL execution elapsed time
RMAN cpu time (backup/restore)
background IM population cpu time
background IM population elapsed time
background IM prepopulation cpu time
background IM prepopulation elapsed time
background IM repopulation cpu time
background IM repopulation elapsed time
background IM trickle repopulation cpu time
background IM trickle repopulation elapsed time
background cpu time
background elapsed time
connection management call elapsed time
failed parse (out of shared memory) elapsed time
failed parse elapsed time
hard parse (bind mismatch) elapsed time
hard parse (sharing criteria) elapsed time
hard parse elapsed time
inbound PL/SQL rpc elapsed time
parse time elapsed
repeated bind elapsed time
sequence load elapsed time
sql execute elapsed time
dba_hist_sysstat 视图中的 value 单位 cs 单位,dba_hist_sys_time_model 视图中的单位是 us 单位
DB TIME 波动:
set linesize 220 pagesize 1000
col begin_interval_time for a30
col end_interval_time for a30
col stat_name for a40
WITH sysstat
AS (
SELECT ss.instance_number inst_id,
sn.begin_interval_time begin_interval_time,
sn.end_interval_time end_interval_time,
ss.stat_name stat_name,
ss.VALUE e_value,
LAG(ss.VALUE) OVER(partition by ss.instance_number ORDER BY ss.snap_id)
b_value
FROM dba_hist_sys_time_model ss, dba_hist_snapshot sn
WHERE sn.begin_interval_time >= SYSDATE - 4
AND ss.snap_id = sn.snap_id
AND ss.dbid = sn.dbid
评论