SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Reorganizing SQL/MX Tables and Maintaining Data
HP NonStop SQL/MX Installation and Management Guide544536-007
10-31
Using import to Load Partitions
Using import to Load Partitions
For range-partitioned tables, you can load the data from a single input file or
several input files into a table’s range partitions. The data in the input file or files
must first be ordered by the table’s range partitioning key.
To perform a parallel import from a single input file or a serial import from
multiple input files, use the -F option to specify the number of rows to be skipped
at the beginning of the input file. Use the -C option to specify the number of rows
to be imported after the skipping occurs. You can use the -F and -C options to
instruct import to use the specified rows to load a particular range partition. You
can also specify the start and end positions of the range partition based on the key
column data in the input file. However, you cannot use these options to specify an
actual key value at the command line.
For hash-partitioned tables, import loads all hash partitions in the destination
table in a single operation.
Using import to Perform Serial Partition Loads
To perform a serial load on the partitions of an SQL/MX table, use one instance of
import with the data in the input file sorted first by partition number and, for
performance reasons, sorted secondarily by the clustering key.
Using import to Perform Parallel Partition Loads
Use multiple instances of import to perform a parallel load when the destination table
is range-partitioned and it has no indexes. Some data types require more CPU time
during import such that:
Parallel load provides benefits.
Presorting data by storage key results in faster import time.
Using more processors improves parallel load performance.
You cannot import files into one partition in parallel (that is, you cannot have two
instances of import loading the same partition). Otherwise, NonStop SQL/MX returns
a locking error.
There are two ways to perform a parallel load:
Run multiple instances of the import command—one for each partition in the
destination table—to load data into a partitioned table by using a single input file.
For each import command, specify the number of input rows (records), the
number of the first record to import, and the transaction size.
For example, suppose that you partition the EMPLOYEE table into three partitions.
The first partition begins with 0 (zero) for the employee number, the second
partition begins with 3000 for the employee number, and the third partition begins
with 5000 for the employee number.