Command
cachegroup;
Cache Group TESTUSER.CUSTOMERORDERS:
AutoRefresh Mode: Incremental
AutoRefresh State: On
AutoRefresh Interval: 5 Minutes
Root Table: TESTUSER.CUSTOMER
Where Clause: (none)
Type: Read Only
Child Table: TESTUSER.ORDERTAB
Where Clause: (none)
Type: Read Only
Cache Group TESTUSER.TABCACHE:
Root Table: TESTUSER.TAB3
Where Clause: (none)
Type: Propagate
2 cache groups found.
ttCacheMonitorプロシージャの使用
ttCacheMonitorプロシージャを使用すると、自動リフレッシュおよびエージ・アウト・アクティビティを追跡できます。
例3.34
cgRefreshCountおよびcgTotalNumRowsパラメータを指定してttCacheMonitorを使用すると、AUTOREFRESHが正常に動作しているかどうかを確認できます。
自動リフレッシュが正常に動作している場合は、Oracle実表に対して変更が行われたかどうかに関係なく、自動リフレッシュ時間隔が経過するたびに、cgRefreshCountからの出力の増加が表示されます。
Command> call ttCacheMonitor ('cgRefreshCount', 'ProductInventory', NULL);
< 940 >
1 row found.
Command> call ttCacheMonitor ('cgRefreshCount', 'ProductInventory', NULL);
< 941 >
1 row found.
cgTotalNumRowsからの出力は、Oracle実表に対して変更が行われた場合にのみ増加します。値は、前回の自動リフレッシュ以降にキャッシュ・グループ表で更新された行の数を示します。
Command> call ttCacheMonitor ('cgTotalNumRows', 'ProductInventory', NULL);
< 5 >
1 row found.
キャッシュ・グループがDURATION属性で設定されている場合は、cgMemThresholdおよびcgAgingIntervalパラメータを指定してttCacheMonitorを使用すると、メモリーのしきい値およびキャッシュ・グループ内の古い行がエージ・アウトされる時間を追跡できます。
例3.35
キャッシュ・グループが20分後に容量の40%に達し、その行がエージ・アウトされる可能性がある場合、出力は次のようになります。
Command> call ttCacheMonitor ('cgMemThreshold', 'ProductInventory', NULL);
< 40 >
1 row found.
Command> call ttCacheMonitor ('cgAgingInterval','ProductInventory', NULL);
< 20 >
1 row found.