FastSort Manual

FastSort Manual429834-003
9-1
9 Optimizing Sort Performance
Factors that affect FastSort performance include environmental options, sort
workspace, and system resources. The total elapsed time for a sort operation also
depends on whether you automate routine tasks, such as setting up DEFINEs. This
section helps you understand FastSort software behavior and requirements. It contains
a discussion of scratch and swap files, VLM, and other factors that affect sort
performance.
This section mentions utilities and features that help analyze or increase performance.
These utilities and features are part of the NonStop Kernel.
Managing Sort Workspace
Most sort failures are caused by insufficient workspace. FastSort requires scratch files,
swap files, and memory to sort records. This subsection describes how FastSort
allocates space for sort operations. It also suggests ways to control and modify
FastSort workspace decisions.
Using Scratch Files
A scratch file is a temporary work file for FastSort. For input files that are too large to
sort in memory, FastSort uses one or more scratch files to temporarily store groups of
records called runs. You can specify a scratch file in:
The RUN command
The SORTMERGESTART procedure
A SORT DEFINE
SCRATCH attribute
SCRATCHON attribute
NOSCRATCHON attribute
The SCRATCH attribute of a SUBSORT DEFINE
The =_SORT_DEFAULTS DEFINE
A configuration file for parallel index loading
The LOAD command
The scratch file you specify can already exist. If the file does not exist, FastSort
automatically creates it. If the initial scratch file becomes full, FastSort automatically
selects a suitable volume and creates overflow scratch files. FastSort can use up to 32
scratch files on up to 32 disk volumes to store intermediate runs. The SORTPROG
process sorts each run and then merges the records into the output file.