union queries

The optimizer considers parallel access methods for each part of a union query separately. Each select in a union is optimized separately, so one query can use a parallel plan, another a serial plan, and a third a parallel plan with a different number of worker processes. If a union query requires a worktable, then the worktable may also be partitioned and populated in parallel by worker processes.

If a union query is to return no duplicate rows, then a parallel sort may be performed on the internal worktable to remove duplicate rows.

See Chapter 26, “Parallel Sorting,” for more information about parallel sorting.