FastSort Manual

Optimizing Sort Performance
FastSort Manual429834-003
9-7
Selecting a Scratch Volume for Parallel Sorts
Each scratch file extent can be up to 2048 pages, or 4 KB. For scratch files that
FastSort creates, the default extent size is 4 KB and MAXEXTENTS is 978 extents.
Depending on extent sizes, a nonpartitioned scratch file can be up to 1 TB in size.
Selecting a Scratch Volume for Parallel Sorts
For parallel sorts, each subsort process uses its own initial and overflow scratch files.
A distributor-collector process does not usually require scratch files.
Use the SCRATCH attribute of a SUBSORT DEFINE to specify an initial scratch file for
each subsort process. If you specify a fully qualified file name for this attribute, you
must specify a unique scratch file for each subsort process. You cannot specify a
single scratch file, or different partitions of a single scratch file, for more than one
subsort.
If you want FastSort to automatically manage scratch space for a parallel sort
operation, specify only a volume name in the SCRATCH attribute of the distributor-
collector process SORT DEFINE.
Using the =_SORT_DEFAULTS DEFINE for Parallel Sorts
Follow these guidelines if you use only a =_SORT_DEFAULTS DEFINE to configure a
parallel sort operation.
Each subsort in a parallel sort operation must use a distinct scratch file. If more than
one subsort process uses a single scratch file, disk space and contention problems
can result. Therefore, if you use the =_SORT_DEFAULTS_DEFINE to configure a
parallel sort operation, specify only a volume name for the SORT SCRATCH attribute.
Do not specify a fully qualified file name for this attribute.
Specifying Overflow Scratch Volumes for Subsorts
For large parallel sorts or when data is distributed unevenly across partitions, you can
specify overflow scratch volumes for subsorts. In the SORT DEFINE that configures
the distributor-collector process, specify a SCRATCHON list of overflow scratch
volumes. When you specify SCRATCHON volumes for the distributor-collector
process, the pool of scratch volumes is automatically available for subsorts.
When you load the partitions of an index in parallel, you should specify scratch files
and volumes in a configuration file. If you do not specify a scratch file in the CREATE
INDEX configuration file, FastSort uses the scratch volumes specified in the
=SORT_DEFAULTS DEFINE, if any.
When you use the LOAD utility to load data into a file or table, you should specify a
scratch file or volume in the SCRATCH option. If you do not specify a scratch file in the
LOAD SCRATCH option, FastSort uses scratch volumes specified in the
=SORT_DEFAULTS DEFINE, if any.