TimesTen 应用层数据库缓存学习:10. 监控缓存组的autorefresh操作

测试环境准备

$ sqlplus tthr/oracle@ttorcl
create table orders(ord_num int primary key, ship_time timestamp not null);
insert into orders values(1, sysdate);
commit;
grant select on orders to cacheadm;

$ ttisql -connstr "dsn=cachedb1_1122;uid=cacheadm;pwd=timesten;oraclepwd=oracle" -e "set prompt 'cacheadm>'"
cacheadm>
CREATE READONLY CACHE GROUP "RO" 
 AUTOREFRESH MODE INCREMENTAL INTERVAL 5 SECONDS
 STATE ON
 FROM
  "TTHR"."ORDERS" (
    "ORD_NUM"   NUMBER(38)   NOT NULL,
    "SHIP_TIME" TIMESTAMP(6) NOT NULL,
    PRIMARY KEY("ORD_NUM")
  )
cacheadm>cachegroups cacheadm.ro;

Cache Group CACHEADM.RO:

  Cache Group Type: Read Only
  Autorefresh: Yes
  Autorefresh Mode: Incremental
  Autorefresh State: On
  Autorefresh Interval: 5 Seconds
  Autorefresh Status: ok
  Aging: No aging defined

  Root Table: TTHR.ORDERS
  Table Type: Read Only

1 cache group found.

tthr>select * from orders;
< 1, 2016-04-21 03:36:50.000000 >
1 row found.

$ sqlplus tthr/oracle@ttorcl
declare ord_num number;      
begin
for i in 1..1000 loop
select max(ord_num) into ord_num from orders;
insert into orders values(ord_num+1, sysdate);
commit;
dbms_lock.sleep( 2 );
end loop;
end;
/

使用 ttCacheAutorefreshStatsGet 过程

ttCacheAutorefreshStatsGet返回最近10次auto refresh的统计,包括每次刷新的行数,字节,累积刷新的行数,字节,执行刷新的时间等。

# 在Oracle的批量插入任务启动之前
tthr>call ttcacheautorefreshstatsget('cacheadm','ro');
< 3766624, 2016-04-21 03:41:16.000000, 3779960, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:41:11.000000, 3774960, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:41:06.000000, 3769960, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:41:01.000000, 3764940, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:40:56.000000, 3759940, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:40:51.000000, 3754910, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:40:46.000000, 3749910, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:40:41.000000, 3744900, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:40:36.000000, 3739900, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
< 3766624, 2016-04-21 03:40:31.000000, 3734900, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, Complete, 0, 0, 0, 2016-04-21 03:38:23.000000, 0 >
10 rows found.
# 在Oracle的批量插入任务启动之后
tthr>call ttcacheautorefreshstatsget('cacheadm','ro');
< 3766624, 2016-04-21 03:44:32.000000, 3975150, 79, 10, 2, 28, 2, 0, 10, 0, 26, 356, 26, 160, Complete, 2, 26, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:44:27.000000, 3970150, 78, 10, 3, 42, 3, 10, 0, 0, 24, 328, 24, 150, Complete, 3, 24, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:44:22.000000, 3965150, 77, 0, 2, 28, 2, 0, 0, 0, 21, 286, 21, 140, Complete, 2, 21, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:44:17.000000, 3960150, 76, 10, 3, 42, 3, 10, 0, 0, 19, 258, 19, 140, Complete, 3, 19, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:44:12.000000, 3955140, 75, 0, 2, 28, 2, 0, 0, 0, 16, 216, 16, 130, Complete, 2, 16, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:44:07.000000, 3950140, 74, 0, 3, 42, 3, 0, 0, 0, 14, 188, 14, 130, Complete, 3, 14, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:44:02.000000, 3945130, 73, 0, 2, 28, 2, 0, 0, 0, 11, 146, 11, 130, Complete, 2, 11, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:43:57.000000, 3940130, 72, 10, 3, 40, 3, 0, 10, 0, 9, 118, 9, 130, Complete, 3, 9, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:43:52.000000, 3935130, 71, 40, 2, 26, 2, 0, 40, 0, 6, 78, 6, 120, Complete, 2, 6, 0, 2016-04-21 03:43:23.000000, 0 >
< 3766624, 2016-04-21 03:43:47.000000, 3930120, 70, 10, 3, 39, 3, 10, 0, 0, 4, 52, 4, 80, Complete, 3, 4, 0, 2016-04-21 03:43:23.000000, 0 >
10 rows found.
# 可以看到,由于auto refresh频率为5秒,而插入是每2秒一次,因此,每次auto refresh的行数为2或3,字节数为28或42。 

不过只能看近10次的数据太局限了,只适合在线监控,而不能历史查询。
下面会谈到,所有auto refresh的历史信息都会记录在support log,即ttmesg.log中。

显示change log表的信息

$ sqlplus cacheadm/oracle@ttorcl <- 用cache administrator用户登录

SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 21 04:01:13 2016

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @cacheInfo
*************Autorefresh Objects Information  ***************
Host name: timesten-hol
Timesten datastore name:
/home/oracle/TimesTen/tt1122/info/DemoDataStore/cachedb1_1122
Cache table name: TTHR.ORDERS
Change log table name: tt_06_87139_L
Number of rows in change log table: 6
Maximum logseq on the change log table: 213
Timesten has autorefreshed updates upto logseq: 212
Number of updates waiting to be autorefreshed: 3
Number of updates that has not been marked with a valid logseq: 1
****************************
*************No DDL Tracking objects are found*************

PL/SQL procedure successfully completed.


SQL> select * from TT_06_87139_l

    LOGSEQ FT_CACHEGROUP    ORD_NUM XID
---------- ------------- ---------- --------------------
       405             0       1009 6.28.25350
       405             0       1010 9.3.25402
       404             0       1006 6.31.25342
       406             0       1011 1.2.19039
       404             0       1007 5.9.25582
       404             0       1008 2.11.25415
       406             0       1012 2.9.25414
       406             0       1013 10.16.19021

8 rows selected.

support log(ttmesg.log)中autorefresh相关信息

在support log中,所有以CAC开头的信息都与cache agent有关,你可以使用CAC或’auto refresh’来搜索,例如:

$ grep CAC ttmesg.log |wc -l
12192
$ grep -i 'autorefresh'  ttmesg.log |wc -l
6658

日志中显示的信息比之前ttCacheAutorefreshStatsGet显示的可读性更强,如

04:33:26.63 Info: CAC:  3938: TT47087-3938-1083492672-refresh06188: CACHEDB1_1122 Cache agent refreshed cache group CACHEADM.RO: Number - 665, Start Timestamp - Thu Apr 21 04:33:26 2016 , Cache Agent Uptime - 6909520ms, Duration - 0ms, NumRows - 5, NumRootTblRows - 5, NumInsertRows - 3, NumUpdateRows - 2, NumDeleteRows - 0, NumOracleRowsFetched - 5, NumOracleBytes - 80, ValidationDuration - 0ms, MarkerDuration - 0ms, RetrieveLogTblInfoDuration - 10ms, queryExecDuration - 0ms, queryFetchDuration - 0ms, ttApplyDuration - 0ms, tt1stXactCommitTime - 4ms, tt2ndXactCommitTime - 0ms, ttNumCommits - 1, totalNumRows - 2117, totalNumRootTblRows - 2117, totalNumOracleRowsFetched - 2117, totalNumOracleBytes - 32484, totalDuration - 1760ms, Status - Complete

auto refresh成功的信息如下:

04:33:26.63 Info: CAC:  3938: TT47119-3938-1083492672-refresh06262: CACHEDB1_1122 Autorefresh number 665 finished for interval 5000ms successfully
04:33:26.63 Info: CAC:  3938: TT47078-3938-1083492672-fresher01809: CACHEDB1_1122 Autorefresh number 665 succeeded for interval 5000 milliseconds

诊断 autorefresh 性能问题

使用ttTraceMon

$ tttracemon cachedb1_1122
Trace monitor; empty line to exit
Trace> level autorefresh 1
Trace> dump
23:45:41.266    4097 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1102, minAccessCounter=1089
23:45:41.266    4098 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1102, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:46:41.310    4099 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1103, minAccessCounter=1089
23:46:41.310    4100 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1103, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:47:41.422    4101 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1104, minAccessCounter=1089
23:47:41.422    4102 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1104, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:48:41.475    4103 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1105, minAccessCounter=1089
23:48:41.475    4104 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1105, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:49:41.543    4105 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1106, minAccessCounter=1089
23:49:41.543    4106 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1106, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:50:41.587    4107 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1107
23:50:41.587    4108 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1107, ltblid= 1798080
23:50:41.588    4109 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1107, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:50:41.588    4110 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1107
23:50:41.588    4111 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1107, minAccessCounter=1089
23:50:41.588    4112 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1107, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:51:41.686    4113 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1108
23:51:41.686    4114 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1108, ltblid= 1798080
23:51:41.686    4115 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1108, reason = 'no more qualified rows found', 0 deleted, 2 remaining, tbl = ORACLE.TBAGING
23:51:41.686    4116 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1108
23:51:41.686    4117 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1108, minAccessCounter=1089
23:51:41.686    4118 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1108, minAccessCounter=1089, permRatio=0.236523, highMemThreshold=0.300000
23:52:41.765    4119 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1109
23:52:41.765    4120 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1109, ltblid= 1798080
23:52:41.765    4121 AGING    3L  135C   2613P curTime=1109, 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:52:41.765    4122 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1109, reason = 'no more rows', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:52:41.765    4123 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1109
23:52:41.765    4124 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1109, minAccessCounter=1089
23:52:41.765    4125 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1109, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:53:41.815    4126 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1110
23:53:41.815    4127 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1110, ltblid= 1798080
23:53:41.815    4128 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1110, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:53:41.815    4129 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1110
23:53:41.815    4130 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1110, minAccessCounter=1089
23:53:41.815    4131 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1110, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:54:41.859    4132 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1111
23:54:41.859    4133 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1111, ltblid= 1798080
23:54:41.859    4134 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1111, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:54:41.859    4135 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1111
23:54:41.859    4136 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1111, minAccessCounter=1089
23:54:41.859    4137 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1111, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:55:41.896    4138 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1112
23:55:41.896    4139 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1112, ltblid= 1798080
23:55:41.896    4140 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1112, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:55:41.896    4141 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1112
23:55:41.896    4142 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1112, minAccessCounter=1089
23:55:41.896    4143 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1112, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:56:41.961    4144 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1113
23:56:41.961    4145 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1113, ltblid= 1798080
23:56:41.961    4146 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1113, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:56:41.961    4147 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1113
23:56:41.961    4148 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1113, minAccessCounter=1089
23:56:41.961    4149 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1113, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:57:42.032    4150 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1114
23:57:42.032    4151 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1114, ltblid= 1798080
23:57:42.032    4152 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1114, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:57:42.032    4153 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1114
23:57:42.032    4154 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1114, minAccessCounter=1089
23:57:42.032    4155 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1114, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:58:42.203    4156 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1115
23:58:42.203    4157 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1115, ltblid= 1798080
23:58:42.204    4158 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1115, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:58:42.204    4159 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1115
23:58:42.204    4160 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1115, minAccessCounter=1089
23:58:42.204    4161 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1115, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
23:59:42.262    4162 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1116
23:59:42.262    4163 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1116, ltblid= 1798080
23:59:42.262    4164 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1116, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
23:59:42.262    4165 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1116
23:59:42.262    4166 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1116, minAccessCounter=1089
23:59:42.262    4167 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1116, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
00:00:42.359    4168 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1117
00:00:42.359    4169 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1117, ltblid= 1798080
00:00:42.359    4170 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1117, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
00:00:42.359    4171 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1117
00:00:42.359    4172 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1117, minAccessCounter=1089
00:00:42.359    4173 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1117, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
00:01:42.417    4174 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1118
00:01:42.417    4175 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1118, ltblid= 1798080
00:01:42.417    4176 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1118, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
00:01:42.417    4177 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1118
00:01:42.417    4178 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1118, minAccessCounter=1089
00:01:42.417    4179 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1118, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
00:02:42.453    4180 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1119
00:02:42.453    4181 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1119, ltblid= 1798080
00:02:42.453    4182 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1119, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
00:02:42.453    4183 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1119
00:02:42.453    4184 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1119, minAccessCounter=1089
00:02:42.453    4185 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1119, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
00:03:42.496    4186 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1120
00:03:42.496    4187 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1120, ltblid= 1798080
00:03:42.496    4188 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1120, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
00:03:42.496    4189 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1120
00:03:42.496    4190 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1120, minAccessCounter=1089
00:03:42.496    4191 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1120, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
00:04:42.549    4192 AGING    1L  135C   2613P Entering sbAgingTB(): curTime=1121
00:04:42.549    4193 AGING    2L  135C   2613P Entering sbAgingOneTable(): curTime=1121, ltblid= 1798080
00:04:42.549    4194 AGING    2L  135C   2613P Exiting sbAgingOneTable(): curTime=1121, reason = 'no more qualified rows found', 0 deleted, 0 remaining, tbl = ORACLE.TBAGING
00:04:42.549    4195 AGING    1L  135C   2613P Exiting sbAgingTB(): curTime=1121
00:04:42.549    4196 AGING    1L  135C   2613P Entering sbAgingLRU(): curTime=1121, minAccessCounter=1089
00:04:42.549    4197 AGING    1L  135C   2613P Exiting sbAgingLRU(): curTime=1121, minAccessCounter=1089, permRatio=0.236157, highMemThreshold=0.300000
05:17:50.750    4198 AUTOREFRESH 1L    9C   3938P Autorefresh number 1197 started for interval 5000ms
05:17:50.806    4199 AUTOREFRESH 1L    9C   3938P Duration For Interval 5000ms: 50ms
05:17:50.806    4200 AUTOREFRESH 1L    9C   3938P Num Rows For Interval 5000ms: 0
05:17:50.806    4201 AUTOREFRESH 1L    9C   3938P Num Root Rows For Interval 5000ms: 0
05:17:50.806    4202 AUTOREFRESH 1L    9C   3938P Cumulative Rows for Interval 5000ms: 2906
05:17:50.806    4203 AUTOREFRESH 1L    9C   3938P Cumulative Root Rows for Interval 5000ms: 2905
05:17:50.806    4204 AUTOREFRESH 1L    9C   3938P Autorefresh number 1197 ended for interval 5000ms successfully.
05:17:51.539    4205 AUTOREFRESH 1L    8C   3938P ReplDDSRec Start Finished: ds: cachedb1_1122, dsstat: alive, chg: 04/21/16 02:46:43 +00:00, hb: 04/21/16 12:17:46 +00:00, cg: CACHEADM.RO, tbl: TTHR.ORDERS, id: 87139:1, tblstat: ok, bk: 815, rec: -1, log: 815
109 records dumped
Trace> 

trace level 4时的输出,注意其中的autorefresh Query

Trace> level autorefresh 4
Trace> dump

05:20:25.984    4641 AUTOREFRESH 3L    9C   3938P Incremental autorefresh started for table TTHR.ORDERS. soLog(845), eoLog(846) selectLimit(0) upperBound(:u34).
05:20:25.984    4642 AUTOREFRESH 4L    9C   3938P Autorefresh Query: SELECT L."ORD_NUM", X."SHIP_TIME", X.ft$NotDelete FROM (SELECT DISTINCT "ORD_NUM" FROM "CACHEADM"."TT_06_87139_L" WHERE logseq > :logseq AND ft_cacheGroup <> 100000000000*418939754+1237845634) L, (SELECT "TTHR"."ORDERS"."ORD_NUM", "TTHR"."ORDERS"."SHIP_TIME", 1 AS ft$NotDelete  FROM "TTHR"."ORDERS") X WHERE L."ORD_NUM" = X."ORD_NUM" (+), logseq: 845, selectLimit: 0, upperBound �:u34
05:20:25.987    4643 AUTOREFRESH 3L    9C   3938P Duration for table TTHR.ORDERS: 0ms
05:20:25.987    4644 AUTOREFRESH 3L    9C   3938P Num Rows for table TTHR.ORDERS: 4
05:20:25.987    4645 AUTOREFRESH 3L    9C   3938P Cumulative rows for table TTHR.ORDERS: 3029
05:20:25.987    4646 AUTOREFRESH 4L    9C   3938P Autorefresh Query Execute duration for table TTHR.ORDERS: 0ms
05:20:25.987    4647 AUTOREFRESH 4L    9C   3938P Autorefresh Query Fetch duration for table TTHR.ORDERS: 0ms
05:20:25.987    4648 AUTOREFRESH 4L    9C   3938P Autorefresh Query Apply duration for table TTHR.ORDERS: 0ms
05:20:25.987    4649 AUTOREFRESH 4L    9C   3938P Max logseq applied for table TTHR.ORDERS: 846
05:20:25.987    4650 AUTOREFRESH 3L    9C   3938P Incremental autorefresh ended for table TTHR.ORDERS. soLog(845), eoLog(846) selectLimit(0) upperbound(:u34).

由于此命令非常消耗资源,使用后应将 trace级别设回缺省。

Trace> show autorefresh
AUTOREFRESH  ... 4
Trace> level autorefresh 0
Trace> quit

使用 SNMP traps 来报警auto refresh相关问题

与auto refresh相关的trap如下:

  • ttCacheAutoRefQueFullTrap
  • ttCacheIncAutoRefFailedTrap
  • ttCacheValidationErrorTrap
  • ttCacheValidationWarnTrap
  • ttCacheValidationAbortedTrap

你可能感兴趣的:(refresh,timesten,cachegroup,缓存组)