PSORT_NPROCS environment variable
The PSORT_NPROCS environment variable specifies the maximum number of threads that the database server can use to sort a query. When a query involves a large sort operation, multiple sort threads can execute in parallel to improve the performance of the query.
When the value of PDQ priority is 0
and PSORT_NPROCS is
greater than 1, the database server uses parallel sorts. The management
of PDQ does not limit these sorts. In other words, although the sort
is executed in parallel, the database server does not regard sorting
as a PDQ activity. When PDQ priority is 0
, the database
server does not control sorting by any of the PDQ configuration parameters.
When PDQ priority is greater than 0 and PSORT_NPROCS is greater than 1, the query benefits both from parallel sorts and from PDQ features such as parallel scans and additional memory. Users can use the PDQPRIORITY environment variable to request a specific proportion of PDQ resources for a query. You can use the MAX_PDQPRIORITY parameter to limit the number of such user requests. For more information about MAX_PDQPRIORITY, see Limiting PDQ resources in queries.
For more information about sorts during index builds, see Improving performance for index builds.