Reference Guide > TDV Query Engine Options > UNION, INTERSECT, and EXCEPT Options > PARALLEL (UNION, INTERSECT, and EXCEPT Option)
 
PARALLEL (UNION, INTERSECT, and EXCEPT Option)
PARALLEL, when used for a UNION operator, causes the query engine to stream the left-hand side while buffering the right-hand side in memory using a background thread. (The buffer is unbounded, and fails over to disk if necessary.) This can speed up query performance. The trade-off is that the operator becomes memory-intensive. Use this option only if you believe you can load the result set without reaching the managed memory limit.
If you want to minimize memory use while processing both children in parallel, refer to the ROUND_ROBIN (UNION, INTERSECT, and EXCEPT Option) to see a description of a technique that maintains a small, bounded buffer in memory for each child.
If the PARALLEL option is not specified, the query engine does not load the right-hand side of the UNION while streaming the left-hand side.
Note: The PARALLEL option applies only to UNION—not to INTERSECT or EXCEPT.
Operators
UNION, UNION ALL
Syntax
parallel
Example
SELECT column1 FROM table1
UNION ALL {OPTION parallel}
SELECT column1 FROM table2