A method and computer program are disclosed for measuring the parallelism
of an execution step. The method includes determining whether the step
operates on rows whose primary index is specified. If the primary index
is specified, the parallelism is measured as single. If the primary index
is not specified, the method determines whether the step uses an output
from a previous step. If an output is used, the number of rows in the
output is compared to a specified number. If the number of rows is
greater than the specified number, the parallelism is measured as total.
In one implementation, the geography of the output is determined and the
previous step is compared to specified types such that if the primary
index is not specified, the number is rows is not greater than a
specified number, the geography does not write output rows to all
parallel units, and the previous step is of a specified type, then the
parallelism is measured as partial.