To increase performance of a SORT operation, configure SORT to retain more of the record information in memory.

You should consider setting this environment variable if the total size of files in your SORT operation is over 1GB.


During a SORT operation, temporary files are created to hold the non-key data portions of a record that are greater than 1024 bytes.

During a SORT operation, non-key data portions of a record are held in memory depending on the size of SORTSPACE:

Size of SORTSPACE Maximum non-key data portion held in memory
1MB or greater 5KB
4MB or greater 12KB
8MB or greater 28KB
16MB or greater 62KB
Note: In general, the non-key data portion is the size of the record minus the size of the key data.

The default value is 0.