1.1.1

Table Of Contents
Description
Note: If you congure a table with the DESTROY eviction action, you must ensure that all queries against
the table lter results using a primary key value. Queries that do not lter on a primary key may yield
partial results if rows are destroyed on eviction. This limitation does not apply to tables that are congured
with the OVERFLOW eviction action; query completeness is assured using both in-memory and overow
table data as necessary.
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 a
synchronous Writer plug-in to respond to 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.
See also Limitations of Eviction on page 191.
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.
Note: The integer specied in LRUMEMSIZE is the memory size in megabytes.
You must enable eviction for a table when the table is created; you cannot enable eviction at a later time using
ALTER TABLE, although you can use ALTER TABLE to change the LRUMEMSIZE value.
Eviction is performed locally by each member in the server groups that host the table. After the congured
memory size, heap size, or LRU count is reached, inserts to the table succeed after a corresponding eviction of
least-recently-used rows.
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 617 describes how to congure the heap percentage.
The eviction action specied in the EVICTACTION clause determines whether the least-recently-used 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.
Syntax
[ EXPIRE { TABLE | ENTRY } WITH { IDLETIME seconds | TIMETOLIVE seconds}
ACTION DESTROY ]*
505
SQL Language Reference