10g的doc居然没有查到这2个视图的解释...
这2个视图的结构完全相同,数据到底有什么区别?
[@more@]一下是11gR2中这个视图的解释:
V$METRIC displays the most recent statistic values for the complete set of metrics captured by the AWR infrastructure.
V$METRIC_HISTORY displays all the available statistic values for the complete set of metrics captured by the AWR infrastructure.
这里提到V$METRIC 显示了recent的数据,而V$METRIC_HISTORY显示了all,查询一下发现recent=1分钟,all表示至实例启动以来:
SQL> select min(begin_time),max(end_time) from v$metric;
MIN(BEGIN_TIME) MAX(END_TIME)
------------------- -------------------
2009/10/12 23:02:30 2009/10/12 23:14:01
SQL> select min(begin_time),max(end_time) from v$metric_history
2 ;
MIN(BEGIN_TIME) MAX(END_TIME)
------------------- -------------------
2009/10/12 23:02:30 2009/10/12 23:14:10
SQL> select startup_time from v$instance;
STARTUP_TIME
-------------------
2009/10/12 23:02:14
SQL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/19602/viewspace-1027790/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/19602/viewspace-1027790/