1.1

Table Of Contents
) PARTITION BY COLUMN (COUNTRY_ISO_CODE)
COLOCATE WITH (COUNTRIES)
REDUNDANCY Clause
Use the REDUNDANCY clause to specify the number of redundant copies that should be maintained for each
partition, to ensure that the partitioned table is highly available even if members fail. Because SQLFire is primarily
a memory-based data management system, it is important to congure this carefully to enable failover in case
of failures. A value too large adversely affects performance, network usage, and memory usage. Typically a
value of 1 is recommended; this setting maintains one copy in addition to the primary copy of the table data.
Note: Colocated partitioned tables must have the same redundancy.
Example with REDUNDANCY Clause
In this example it is assumed that you have congured SQLFire to create partitioned tables (rather than replicated
tables) by default.
CREATE TABLE COUNTRIES
(
COUNTRY VARCHAR(26) NOT NULL,
COUNTRY_ISO_CODE CHAR(2) NOT PRIMARY KEY,
REGION VARCHAR(26),
)
REDUNDANCY 1
BUCKETS Clause
The optional BUCKETS attribute species the xed number of "buckets," the smallest unit of data containment
for the table that can be moved around. Data in a single bucket resides and moves together. If not specied, the
number of buckets defaults to 113.
Note: Colocated tables must all have the same number of buckets. If you specify a mismatched BUCKETS
value when using the COLOCATE WITH clause, SQLFire throws an exception. If you specify a
mismatched BUCKETS value without using the COLOCATE WITH clause, SQLFire does not perform
default location for the new table. If you specify the COLOCATE WITH clause but do not specify a
BUCKETS value, SQLFire inherits the BUCKETS value from the colocated table.
For range or list partitioning, each range or list is mapped to one bucket for the table, so total number of buckets
cannot be less than the number of ranger or lists. If total number of buckets is larger than the total number of
ranges or lists, then the values that fall outside of the specied ranges or lists are distributed among all the
available buckets including those that are not mapped to any of the ranges or lists.
RECOVERYDELAY Clause
Use the RECOVERYDELAY clause to specify the default time in milliseconds that existing members will wait
before satisfying redundancy after a member crashes. The default is -1, which indicates that redundancy is not
recovered after a member fails. By default a SQLFire system always attempts to satisfy redundancy if required
when a new server member that is hosting data for the table is started.
MAXPARTSIZE Clause
The MAXPARTSIZE attribute species the maximum memory for any partition on a member in megabytes.
Use it to load-balance partitions among available members.
487
SQL Language Reference