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

本文主要是介绍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 SECONDSSTATE ONFROM"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 OnlyAutorefresh: YesAutorefresh Mode: IncrementalAutorefresh State: OnAutorefresh Interval: 5 SecondsAutorefresh Status: okAging: No aging definedRoot Table: TTHR.ORDERSTable Type: Read Only1 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 2016Copyright (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 optionsSQL> @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_lLOGSEQ FT_CACHEGROUP    ORD_NUM XID
---------- ------------- ---------- --------------------405             0       1009 6.28.25350405             0       1010 9.3.25402404             0       1006 6.31.25342406             0       1011 1.2.19039404             0       1007 5.9.25582404             0       1008 2.11.25415406             0       1012 2.9.25414406             0       1013 10.16.190218 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> dump05: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

这篇关于TimesTen 应用层数据库缓存学习:10. 监控缓存组的autorefresh操作的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/677714

相关文章

PyCharm接入DeepSeek实现AI编程的操作流程

《PyCharm接入DeepSeek实现AI编程的操作流程》DeepSeek是一家专注于人工智能技术研发的公司,致力于开发高性能、低成本的AI模型,接下来,我们把DeepSeek接入到PyCharm中... 目录引言效果演示创建API key在PyCharm中下载Continue插件配置Continue引言

使用Python实现操作mongodb详解

《使用Python实现操作mongodb详解》这篇文章主要为大家详细介绍了使用Python实现操作mongodb的相关知识,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录一、示例二、常用指令三、遇到的问题一、示例from pymongo import MongoClientf

C#实现系统信息监控与获取功能

《C#实现系统信息监控与获取功能》在C#开发的众多应用场景中,获取系统信息以及监控用户操作有着广泛的用途,比如在系统性能优化工具中,需要实时读取CPU、GPU资源信息,本文将详细介绍如何使用C#来实现... 目录前言一、C# 监控键盘1. 原理与实现思路2. 代码实现二、读取 CPU、GPU 资源信息1.

数据库oracle用户密码过期查询及解决方案

《数据库oracle用户密码过期查询及解决方案》:本文主要介绍如何处理ORACLE数据库用户密码过期和修改密码期限的问题,包括创建用户、赋予权限、修改密码、解锁用户和设置密码期限,文中通过代码介绍... 目录前言一、创建用户、赋予权限、修改密码、解锁用户和设置期限二、查询用户密码期限和过期后的修改1.查询用

使用MongoDB进行数据存储的操作流程

《使用MongoDB进行数据存储的操作流程》在现代应用开发中,数据存储是一个至关重要的部分,随着数据量的增大和复杂性的增加,传统的关系型数据库有时难以应对高并发和大数据量的处理需求,MongoDB作为... 目录什么是MongoDB?MongoDB的优势使用MongoDB进行数据存储1. 安装MongoDB

mysql数据库分区的使用

《mysql数据库分区的使用》MySQL分区技术通过将大表分割成多个较小片段,提高查询性能、管理效率和数据存储效率,本文就来介绍一下mysql数据库分区的使用,感兴趣的可以了解一下... 目录【一】分区的基本概念【1】物理存储与逻辑分割【2】查询性能提升【3】数据管理与维护【4】扩展性与并行处理【二】分区的

Linux使用fdisk进行磁盘的相关操作

《Linux使用fdisk进行磁盘的相关操作》fdisk命令是Linux中用于管理磁盘分区的强大文本实用程序,这篇文章主要为大家详细介绍了如何使用fdisk进行磁盘的相关操作,需要的可以了解下... 目录简介基本语法示例用法列出所有分区查看指定磁盘的区分管理指定的磁盘进入交互式模式创建一个新的分区删除一个存

Golang操作DuckDB实战案例分享

《Golang操作DuckDB实战案例分享》DuckDB是一个嵌入式SQL数据库引擎,它与众所周知的SQLite非常相似,但它是为olap风格的工作负载设计的,DuckDB支持各种数据类型和SQL特性... 目录DuckDB的主要优点环境准备初始化表和数据查询单行或多行错误处理和事务完整代码最后总结Duck

IDEA如何切换数据库版本mysql5或mysql8

《IDEA如何切换数据库版本mysql5或mysql8》本文介绍了如何将IntelliJIDEA从MySQL5切换到MySQL8的详细步骤,包括下载MySQL8、安装、配置、停止旧服务、启动新服务以及... 目录问题描述解决方案第一步第二步第三步第四步第五步总结问题描述最近想开发一个新应用,想使用mysq

C# 读写ini文件操作实现

《C#读写ini文件操作实现》本文主要介绍了C#读写ini文件操作实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧... 目录一、INI文件结构二、读取INI文件中的数据在C#应用程序中,常将INI文件作为配置文件,用于存储应用程序的