SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Clauses
HP NonStop SQL/MX Reference Manual540440-003
7-5
PARTITION Clause
PARTITION Clause
Considerations for PARTITION
Examples of Partitions
The PARTITION clause of the CREATE INDEX and CREATE TABLE statements
creates one or more secondary partitions for a table or index.
NonStop SQL/MX supports range partitioning and hash partitioning. See Partitions on
page 6-79 for details.
PARTITION is an SQL/MX extension.
BY (partitioning-column[,partitioning-column]...)
specifies the partitioning columns. The default is the default partitioning key
described by the STORE BY clause. Partitioning character columns can only be of
ISO88591 character set.
[(ADD partn-defn [,ADD partn-defn])]
specifies the LOCATION of secondary partitions for a range-partitioned table or a
hash-partitioned table. For range-partitioned tables only, each ADD also specifies
the FIRST KEY for that partition.
FIRST KEY {col-value | (col-value [,col-value]...)}
specifies the beginning of the range for a range-partitioned table or index partition.
The FIRST KEY clause specifies the lowest values in the partition for columns
stored in ascending order and the highest values in the partition for columns stored
in descending order. These column values are referred to as the partitioning key.
{[RANGE] PARTITION
[BY (partitioning-column [,partitioning-column] ....)]
[(ADD range-partn-defn [,ADD range-partn-defn]...)]
|
HASH PARTITION
[BY (partitioning-column [,partitioning-column]...)]
(ADD partn-defn [,ADD partn-defn]...)}
range-partn-defn is:
FIRST KEY {col-value | (col-value [,col-value]...)}
partn-defn
partn-defn is:
LOCATION $volume[.subvolume.file-name]
[NAME partition-name] [attribute [attribute]...]
attribute is:
EXTENT ext-size | (pri-ext-size [,sec-ext-size])
| MAXEXTENTS num-extents