Online Defragmentation of a TimesTen Database
Online defragmentation is the process to defragment the database to make memory available for the existing tables. When the online defragmentation feature is enabled, it defragments not only the regular database tables but also cache tables, including those within autorefresh cache groups.
Defragmentation of cache tables in autorefresh cache groups happens after each
autorefresh cycle. All standby cache tables are defragged as if they are regular user
tables. Therefore, the defragmentation of these tables is governed by the defrag
settings (DefragThreshold, DefragSpeed, and
DefragCycle). If the standby database is promoted to the active
database, its cache tables are defragmented after each autorefresh cycle.
Defragmentation of Asynchronous WriteThrough (AWT), Synchronous writethrough (SWT), and
User managed cache tables occurs when the background defragmentation process determines
it is necessary. For details on how to configure the online defragmentation connection
attributes, see Online Defragmentation of TimesTen
Databases in the Oracle TimesTen In-Memory Database Operations Guide.
For user managed cache groups, manual refresh operation can run into lock
conflicts if the LockWait=0. To prevent lock conflicts between the
manual refresh of user managed cache groups and defragmentation process, set the
application’s LockWait value greater than 0. For
details on how to configure LockWait attribute, see LockWait in the Oracle TimesTen In-Memory
Database Reference.
If you set DefragSpeed to a non-zero value, it enables the
defragmentation for the cache group's tables.
If you set DefragSpeed=0, it disables the defragmentation of the
database, including the cache tables.
The DefragCycle setting does not affect when defragmentation
is performed on read-only autorefresh cache groups. DefragCycle only
affects tables that are not read-only cache tables or autorefresh enabled cache tables.
For read-only dynamic cache groups, autorefresh is enabled, which causes the cache agent
to perform defragmentation after each autorefresh cycle. See DefragThreshold, DefragSpeed, and DefragCycle in the Oracle TimesTen In-Memory
Database Reference.