FastSort Manual

Sorting From NonStop SQL/MP
FastSort Manual429834-003
8-7
Loading Data
joining column, FastSort also sorts the outer table data and stores it in a second
temporary entry-sequenced table. The two temporary tables are then merged to form
the sort merge join result.
By default, FastSort creates these temporary tables on the default swap volume. To
avoid disk space contention, move the swap file to a volume other than the default. For
information on how to specify swap file location, see Section 9, Optimizing Sort
Performance
For more information about sort merge joins and equijoin queries, see SQL/MP Query
Guide.
Loading Data
When you execute CREATE INDEX or LOAD and the source table contains data,
SQL/MP uses FastSort to help process the data under these circumstances:
CREATE INDEX with PARALLEL EXECUTION ON
LOAD with PARALLEL EXECUTION ON
LOAD without the SORTED option if the target table is key-sequenced
If the target table is partitioned, you can specify PARALLEL EXECUTION ON to load
partitions in parallel. SQL/MP starts a record generator (RECGEN) process for each
partition of the table and a sort process (SORTPROG) for each partition of the index.
Record generator processes read the base table rows. Sort processes sort the
generated rows and write them to the index.
Figure 8-1 on page 8-8 shows the interaction between the SQL/MP catalog manager
and RECGEN and SORTPROG processes when you load data in parallel. If neither
base table nor index is partitioned, SQL/MP uses only one RECGEN process and one
SORTPROG process.