1.1

Table Of Contents
PARTITION BY RANGE ( column-name )
(
VALUES BETWEEN value AND value
[ , VALUES BETWEEN value AND value ]*
)
|
PARTITION BY LIST ( column-name )
(
VALUES ( value [ , value ]* )
[ , VALUES ( value [ , value ]* ) ]*
)
|
PARTITION BY ( expression )
}
[ COLOCATE WITH ( table-name [ , table-name ] * ) ]
}
[ REDUNDANCY integer-constant ]
[ BUCKETS integer-constant ]
[ MAXPARTSIZE integer-constant ]
[ RECOVERYDELAY integer-constant ]
Note: If the table has no primary key, then SQLFire generates a unique row ID that is uses for partitioning
the data.
SQLFire supports the partitioning strategies described below.
DescriptionPartitioning strategy
The PARTITION BY COLUMN clause denes a set of column names to use as the basis for
partitioning. As a short-cut, you can use PARTITION BY PRIMARY KEY to refer to the table's primary
Column partitioning
key column(s). SQLFire uses an internal hash function that typically uses the hashCode() method of
the underlying Java type for the specied column. For multiple columns, the internal hash function
uses the serialized bytes of the specied columns to compute the hash.
The PARTITION BY RANGE clause species the ranges of a eld that should be colocated.
This ensures the locality of data for range queries and for cross-table joins. The lower limit of the range
Range partitioning
is inclusive and the upper limit is exclusive. It is not necessary for the ranges to cover the whole spectrum
of possible values for the eld. Values that are not covered by the range are automatically partitioned
in the server group, but with no guarantee of locality for those values.
The PARTITION BY LIST clause species the set of values of a eld that should be colocated
to optimize queries and to support cross-table joins. It is not necessary to list all of the possible values
List partitioning
for the eld. Any the values that are not part of the list are automatically partitioned in the server group,
but with no guarantee of locality for those values.
The PARTITION BY ( expression ) clause that includes an expression is a type of
hash partitioning that uses the expression to specify the value on which to hash. The expression must
Expression partitioning
only reference eld names from the table. This allows rows to be colocated based on a function of their
values.
Partitioning Examples
You can partition tables by, for example, column (such as customer name), expression, priority ranges, and
status.
63
Partitioning Tables