ttDBCompactConfig
The ttDBCompactConfig built-in procedure turns on automatic database compaction. By default, TimesTen does not compact databases automatically.
Required Privilege
This procedure requires ADMIN privilege.
Syntax
ttDBCompactConfig([[value][,[value]][,[value]]])
Parameters
ttDBCompactConfig has the parameters:
| Parameter | Type | Description |
|---|---|---|
|
|
|
Specifies the number of data blocks to be compacted. Values from |
|
|
|
Number of compaction operations that can occur per second. Values from |
|
|
|
Specifies the minimum amount of the database that needs to be compacted, before automatic database compaction occurs. The units are the same as for parameter quantum. Values from |
Result Set
ttDBCompactConfig returns the result set:
| Column | Type | Description |
|---|---|---|
|
|
|
Currently active setting for |
|
|
|
Currently active setting for |
|
|
|
Currently active setting for |
Examples
To view the current settings for automatic database compaction, use:
CALL ttDbCompactConfig; < 0,0,0 > 1 row found.
Note:
These are the default settings. Automatic database compaction is disabled if either of the first two parameters is 0.To enable automatic database compaction on 1,000 blocks once a second, use:
CALL ttDbCompactConfig (1000,1,0); < 1000,1,0 > 1 row found.
To enable automatic database compaction on 5,000 blocks ten times a second, use:
CALL ttDbCompactConfig (5000,10,0); < 5000,10,0 > 1 row found.
To enable automatic database compaction on 2,000 blocks five times a second, but only perform compaction when there is at least this much to compact, use:
CALL ttDbCompactConfig (2000,5,2000); < 2000,5,2000 > 1 row found.
To stop automatic database compaction from doing further compaction, after it was turned on (note that it is off by default), use:
CALL ttDbCompactConfig (0,0,0);
You can set just one or two values at a time, using commas as placeholders:
CALL ttDBCompactConfig(2000,5,2000); < 2000, 5, 2000 > 1 row found. call ttDBCompactConfig(3000); < 3000, 5, 2000 > 1 row found. call ttDBCompactConfig(,10); < 3000, 10, 2000 > 1 row found. call ttDBCompactConfig(,,2500); < 3000, 10, 2500 > 1 row found. call ttDBCompactConfig(3500,,3000); < 3500, 10, 3000 > 1 row found.
Notes
-
After using this built-in procedure to set a parameter value, initiate a checkpoint to ensure the persistence of the parameter change. See details about the
ttCkptprocedure in Checkpoint Operations in the Oracle TimesTen In-Memory Database Operations Guide. For details about the checkpoint built-in procedure, see ttCkpt in this chapter. -
You can specify one, two, or three input values, using commas as placeholders, or no input to see the current values.
-
Changes to parameter values made by
ttDBCompactConfigcannot be rolled back.
See Also