1.1.1

Table Of Contents
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.
Example with BUCKETS, RECOVERYDELAY, and MAXPARTSIZE
-- example showing how to specify the BUCKETS, RECOVERYDELAY
-- and MAXPARTSIZE
CREATE TABLE COUNTRIES
(
COUNTRY VARCHAR(26) NOT NULL,
COUNTRY_ISO_CODE CHAR(2) NOT PRIMARY KEY,
REGION VARCHAR(26),
) PARTITION BY PRIMARY KEY BUCKETS 10 RECOVERYDELAY 10 MAXPARTSIZE 50
SERVER GROUPS Clause
The servers on which the table will be created is either specied by the SERVER GROUPS clause or deduced
from the colocated parent table's server groups, if a colocation clause is specied. If the server groups are not
specied, the default is to create the table on the default server group of the schema.
vFabric SQLFire User's Guide502
vFabric SQLFire Reference