Optimizer Overrides
Page 5 of 6

joinOrder

Function

Allows you to override the optimizer's choice of join order for two tables. When you use the value FIXED, the optimizer chooses the order of tables as they appear in the FROM clause as the join order.

Syntax

joinOrder = { FIXED | UNFIXED }

FIXED means the optimizer should use the order of items as they appear in the FROM clause in the statement; UNFIXED (which is the default) allows the optimizer to make its own choice about join order.

The words FIXED and UNFIXED are case-insensitive.

Default

UNFIXED.

Example

SELECT *
FROM PROPERTIES joinOrder = FIXED
    Flights AS fts, FlightAvailability AS fa
WHERE fts.flight_id = fa.flight_id
AND fts.segment_number = fa.segment_number

Scope

FROM clause optimizer-override property.