FORCE_ORDER (JOIN Option)

FORCE_ORDER causes the query optimizer to honor the order of the joins specified in the SQL statement, rather than reordering the join. If FORCE_ORDER is not specified, the optimizer might switch the order of joins to improve the query execution plan.

This is currently used to prevent:

Union join flipping
Join reordering
Reordering of join while selecting the join algorithm, even if a cardinality estimate is provided.

For information on SQL join reordering, see the TDV User Guide.

Operator

JOIN

Syntax

force_order

Example

SELECT column1 FROM table1 INNER {OPTION force_order} 
	JOIN table2 ON table1.id = table2.id