1.0

Table Of Contents
|
EVICTION BY LRUCOUNT integer-constant
}
[ EVICTACTION { DESTROY | OVERFLOW } ]
Note: SQLFire does not propagate the DESTROY evict action to congured callback implementations,
such as DBSynchronizer. Do not congure eviction with the DESTROY action on a table that has dependent
tables (for example, child rows with foreign keys). If a DELETE statement is called for a parent table row
that was locally destroyed through eviction, the DELETE succeeds in SQLFire. However, the DELETE
operation can later fail in the backend database when DBSynchronizer asynchronously sends the DELETE
command, if dependent rows still exist.
If eviction with the DESTROY action is required for dependent tables, consider using a trigger or writer
implementation to listen for DELETE events on the parent table. The trigger or writer should fail the
DELETE operation if child rows are found to exist in the backend database.
All eviction is performed using a least-recently-used (LRU) algorithm, but you can specify whether SQLFire
performs eviction based on memory size, heap percentage, or LRU count. Eviction is performed locally by each
member in the server groups that hold the table.
The integer specied in LRUMEMSIZE is the memory size in megabytes.
If you chose eviction by heap percentage (LRUHEAPPERCENT), individual SQLFire members begin evicting
data when their heap usage reaches a congured percent. You can congure a global heap percentage for all
SQLFire data stores, or congure different heap percentages for one or more server groups. Heap Eviction
Conguration Procedures on page 571 describes how to congure the heap percentage.
The eviction action specied using the EVICTACTION clause species whether the excess data should be
destroyed (DESTROY) or whether it should be overowed to disk (OVERFLOW). Overow tables use the
disk-store-name (and ASYNCHRONOUS or SYNCHRONOUS settings) for writing to disk if they are specied
in the CREATE TABLE statement. If no disk store is specied, overow tables use the default disk store for
evicted rows.
You can optionally persist an overow table to disk by using the PERSISTENT clause.
EXPIRE Clause
Both tables and table entries can be congured to expire using the EXPIRE clause.
{
EXPIRE TABLE WITH TIMETOLIVE secs ACTION DESTROY
|
EXPIRE TABLE WITH IDLETIME secs ACTION DESTROY
|
EXPIRE ENTRY WITH TIMETOLIVE secs ACTION DESTROY
|
EXPIRE ENTRY WITH IDLETIME secs ACTION DESTROY
}
Note: EXPIRE ENTRY WITH IDLETIME works only when a primary key based query is red.
Otherwise the system will not modify its accessed time when table scans or index scans happen and it
gets destroyed.
For example, if you specify EXPIRE TABLE WITH TIMETOLIVE secs ACTION DESTROY, then SQLFire
destroys the entire table if there have been no writes to the table for the specied number of seconds. Similarly
for EXPIRE ENTRY WITH IDLETIME secs ACTION DESTROY, SQLFire destroys a table entry if the
entry has been not updated for the congured number seconds.
463
SQL Language Reference