Calculating sort pool storage in local storage
The sort process creates fixed-length storage pools in local storage for internal sort structures and work areas. Local storage is created above the 2 GB bar at allocation time.
About this task
- Minimum sort storage = 240 KB
- Maximum sort storage = 128,000 KB
Db2 initially allocates storage for each sort and gradually adds more storage until the maximum sort work area limit is reached or the maximum number of nodes (32,000) are populated at the bottom of the sort tree, whichever occurs first. With 32,000 nodes at the bottom of the sort tree, the average run size for each sorted string is 64,000 records.
The default size of the sort pool is 10,000 KB, but you can override this default value by entering a sort pool size on installation panel DSNTIPC.
Procedure
To estimate the required storage for a sort pool:
32000 * (16 + sort key length + sort
data length)