NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
P-19
Partitions
NOPURGEUNTIL OCT 31 1997, 23:59
NO AUDIT;
Some of the attributes specified apply to the entire table and some only to the primary
partition. NOPURGEUNTIL, NO AUDIT, and LOCKLENGTH apply to all partitions.
The example specifies NO AUDIT because the table will be loaded, after which the
attribute can be changed to AUDIT. The EXTENT and MAXEXTENTS attributes apply
only to the primary partition, for which \SYS1.$VOL1 and a first key of 000000 are
assumed.
Partitions
A partition is the portion of a table or index that resides on a single disk volume. Each
table or index consists of at least one partition.
An “unpartitioned” table or index is a table or index that consists of exactly one
partition. A “partitioned” table or index is a table or index that consists of more than one
partition.
A “primary partition” is the first partition in a partitioned table or index. Other partitions
are called “secondary partitions.If the order is ascending, the primary partition
contains the lowest set of key values in the table or index; if the order is descending, the
primary partition contains the highest set of key values.
A partition name, like a table or index name, is a Guardian name. Each fully expanded
partition name must be unique within the network. If a table or index consists of more
than one partition, the subvolume and file name portions of the name of each partition in
the table or index must be identical. The combination of disk volume and node name
will be different for each partition, reflecting the fact that the different partitions reside
on different disk volumes.
You can create a partitioned table with CREATE TABLE. For a table with key-
sequenced file organization, you can use the PARTONLY MOVE clause of ALTER
TABLE to break the table into partitions or to break a partition into additional partitions.
For a table with entry-sequenced or relative file organization, you can add a partition to
the end of the table with the ADD PARTITION clause of ALTER TABLE. To create a
partitioned index, use CREATE INDEX or the PARTONLY MOVE clause of ALTER
INDEX.
The following rules apply to partitions:
The FIRST KEY value of a new partition cannot duplicate the FIRST KEY value of
another partition of the table.
You cannot create a partition in a nonaudited volume, even if the table that includes
the partition is not audited.
You cannot partition key-sequenced tables that use SYSKEY as the primary key.
New partitions must comply with the limits on the number and size of partitions.
See Limits on page L-5 for more information.