SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
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.
You might specify the three import commands as follows:
/usr/bin:import corpcat.persnl.employee -I empfile -C 3000 -T 500
/usr/bin:import corpcat.persnl.employee -I empfile -C 2000 -F 3000 -T 500
/usr/bin:import corpcat.persnl.employee -I empfile -C 2000 -F 5000 -T 500
The count of the number of records for each partition must be less than or equal to the space
available in each partition, and the rows to be imported into each partition must have an
appropriate clustering key. In the preceding example, the first partition permits employee
numbers ranging from 0 to 2999.
NOTE: Check that the ranges specified are exact. For example, check that there are no
gaps or omissions and no overlap of rows.
• 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 separate input file for each partition.
Each of the input files contains the data for each partition.
For example, you might specify the three import commands for the partitioned EMPLOYEE
table as:
/usr/bin:import corpcat.persnl.employee -I empfile1 -T 500
/usr/bin:import corpcat.persnl.employee -I empfile2 -T 500
/usr/bin:import corpcat.persnl.employee -I empfile3 -T 500
Support for restarting import
For more information, see the SQL/MX Reference Manual.
Using import to Load SQL/MX Tables 201










