RELOAD phase
- Rebuilds any indexes
- Reloads the data into the table space or index spaces
- Collects statistics
- Produces image copies either as data is reloaded or after the data is reloaded
- For SHRLEVEL NONE registers the copies in the Db2 catalog
For more information about the RELOAD phase for a SHRLEVEL CHANGE reorganization, see RELOAD phase.
Resource allocation in the RELOAD phase
REORG PLUS checks the amount of available virtual storage within the region to determine how many indexes it can build concurrently. If you specify a nonzero value for SMAX or MAXSORTS, REORG PLUS uses the lowest of the following values to determine the maximum number of tasks that can run concurrently:
- SMAX value specified in the installation options
- MAXSORTS value specified in the REORG command statement
- Number of processors
If you specify 0 for SMAX and MAXSORTS, REORG PLUS uses the value of the multitasking options RORGMAX, UNLDMAX, or BILDMAX to determine the maximum number of tasks that can run concurrently.
In addition to using the various command and installation options, REORG PLUS considers the following factors when calculating the maximum number of tasks that can run concurrently:
- Number of indexes to be built
- Number of SYSUT1 data sets
- Number of sort work data sets divided by two
After REORG PLUS determines the maximum number of tasks that can run, it uses a recursive algorithm to balance the available virtual storage and sort work files. (Sort work files are not a consideration if you do not specify them in your JCL and you use the SORTNUM installation or command option.) As long as enough virtual storage space and sort work file space is available, processing continues. If either resource appears to be constrained, REORG PLUS adjusts downward the number of indexes built concurrently and repeats the checks.
If the maximum number of indexes to be built decreases to less than one, the reorganization terminates because of constrained resources. This balancing algorithm allows optimized reorganization when enough resources are available. It also allows processing to continue in a nonoptimized manner if only minimal resources are available.
The following figures show the objects that REORG PLUS might use in the RELOAD phase.
RELOAD phase: SHRLEVEL NONE or SHRLEVEL REFERENCE UNLOADONLY table space reorganization
RELOAD phase: SHRLEVEL REFERENCE table space reorganization
RELOAD phase: SHRLEVEL NONE or SHRLEVEL REFERENCE UNLOADONLY index reorganization
RELOAD phase: SHRLEVEL REFERENCE index reorganization