AGING Tracing
Use the ttTraceMon utility to obtain the following information:
-
When aging starts and ends
-
How many rows have been deleted by the aging subdaemon
See Implementing an Aging Policy in Your Tables in the Oracle TimesTen In-Memory Database Operations Guide.
Table 2-6 describes the AGING tracing levels. Each level with a '+' sign includes the trace information described for that level, plus all levels preceding it.
Table 2-6 AGING Tracing Levels
| Level | Description |
|---|---|
|
1 |
Messages about the following events:
|
|
2 |
+ Messages about the following events for each table:
|
|
3 |
+ Detailed report on how many rows were deleted during each aging cycle |
|
4 |
+ Message every time the aging subdaemon wakes up |
In this example, execute ttTraceMon to do an AGING trace on myDSN database. The database contains TTUSER.MYTAB table, which has a time-based aging policy. The table is described as follows:
Command> DESCRIBE ttuser.mytab;
Table TTUSER.MYTAB:
Columns:
*ID TT_INTEGER NOT NULL
TS TIMESTAMP (6) NOT NULL
Aging use TS lifetime 3 minutes cycle 1 minute on
1 table found.
(primary key columns are indicated with *)
The table contains the following rows before the aging cycle begins:
Command> select * from TTUSER.MYTAB; < 1, 2007-03-21 12:54:06.000000 > < 3, 2010-03-17 08:00:00.000000 > < 4, 2007-03-21 12:59:40.000000 > < 5, 2007-03-21 13:00:10.000000 > < 6, 2007-03-21 13:01:22.000000 > 5 rows found.
Execute ttTraceMon to do an AGING trace at level 3. Rather than direct the trace output to a file, read it directly from the trace buffer. Before saving the AGING trace to the buffer, use the flush command to empty the buffer.
% ttTraceMon myDSN Trace monitor; empty line to exit Trace> level aging 3 Trace> flush
Display the trace information in the buffer by using the dump command.
Trace> dump 13:16:56.802 1247 AGING 1L 2045C 17373P Entering sbAgingTB(): curTime=78 13:16:56.803 1248 AGING 2L 2045C 17373P Entering sbAgingOneTable(): curTime=78, ltblid= 637140 13:16:56.804 1249 AGING 3L 2045C 17373P curTime=78, 4 deleted, 1 remaining, tbl = TTUSER.MYTAB 13:16:56.804 1250 AGING 2L 2045C 17373P Exiting sbAgingOneTable(): curTime=78, reason = 'no more rows', 4 deleted, 1 remaining, tbl = TTUSER.MYTAB 13:16:56.804 1251 AGING 1L 2045C 17373P Exiting sbAgingTB(): curTime=78 5 records dumped
Set AGING tracing back to its default setting (0) and exit ttTraceMon:
Trace > level aging 0
Trace > {press ENTER – blank line}