Autorefresh Mode Attribute Settings
You can set the autorefresh mode to designate how the automatic refresh is to perform.
TimesTen supports two autorefresh mode settings:
-
FULL
: All cache tables are automatically refreshed, based on the cache group's autorefresh interval, by unloading all their rows and then reloading from the cached Oracle Database tables.There is no overhead when using full autorefresh mode, but there may be performance implications.
-
INCREMENTAL
: Committed changes on cached Oracle Database tables are automatically refreshed to the TimesTen cache tables based on the cache group's autorefresh interval.There is overhead when using incremental autorefresh mode, but the performance is better than when using full autorefresh.
Some applications choose incremental autorefresh instead of full autorefresh mode for performance reasons. A full autorefresh can affect performance because:
-
More rows are refreshed with a full autorefresh.
-
A full autorefresh runs within a single transaction with no parallelism.
Even if you use incremental autorefresh on your cache group, the first load is a full refresh. In addition, TimesTen may perform a full autorefresh for recovery for certain error scenarios.
Note:
You can disallow full autorefresh with the
DisableFullAutorefresh
cache configuration parameter. See Disabling Full Autorefresh for Cache Groups.
When using incremental autorefresh mode, committed changes on cached Oracle Database tables are tracked in change log tables in the Oracle database. Because incremental autorefresh tracks committed changes on the Oracle database, incremental autorefresh mode incurs some overhead to refresh the cache group for each committed update on the cached Oracle Database tables. Under certain circumstances, it is possible for some change log records to be deleted (truncated) from the change log table before they are automatically refreshed to the TimesTen cache tables. If this occurs, TimesTen initiates a full automatic refresh on the cache group.
See Managing the Cache Administration User's Tablespace for information on how to configure an action to take when the tablespace that the change log tables reside in becomes full.
See Managing a Cache Environment with Oracle Database Objects for information on the change log tables in the Oracle Database.
The change log table on the Oracle database does not have column-level resolution because of performance reasons. Thus, the autorefresh operation updates all of the columns in a row. XLA reports that all of the columns in the row have changed even if the data did not actually change in each column. See XLA and TimesTen Event Management in the Oracle TimesTen In-Memory Database C Developer's Guide or Using JMS/XLA for Event Management in the Oracle TimesTen In-Memory Database Java Developer's Guide.
If you have a dynamic read-only cache group with autorefresh, you can reduce contention and improve performance. See Reducing Contention for Dynamic Read-Only Cache Groups with Incremental Autorefresh and Reducing Lock Contention for Read-Only Cache Groups with Autorefresh and Dynamic Load and Options for Reducing Contention Between Autorefresh and Dynamic Load Operations.