ROUND_ROBIN (UNION, INTERSECT, and EXCEPT Option)

ROUND_ROBIN sets round robin fetch mode, which wraps each child branch of the UNION with a buffered pipe cursor. Each cursor spawns a background thread to prefetch data into its own buffer. When the query is executed, the UNION operator reads from each child pipe cursor in round-robin fashion.

Note: Specifying a fetch mode with SORTMERGE UNION is not usually advisable, because the algorithm reads from both sides.

Operators

UNION, UNION ALL, UNION with DISTINCT, UNION ALL with DISTINCT

Syntax

ROUND_ROBIN=[<int>]

The <int> argument specifies the maximum number of rows that can be prefetched into each buffer. Optional. The default value is 1000. The maximum value is 2000.

Example

SELECT TableX.col2 FROM /local/resource/DB14/TableX
	UNION ALL {OPTION ROUND_ROBIN=1500}
	SELECT col2 from TableY