Type: | integer |
Default: | 8 |
Min: | 1 |
Max: | 2147483647 |
Context: | user |
Restart: | false |
The planner will rewrite explicit JOIN
constructs (except FULL JOIN
s) into lists of FROM
items whenever a list of no more than this many items would result. Smaller values reduce planning time but might yield inferior query plans.
By default, this variable is set the same as from_collapse_limit, which is appropriate for most uses. Setting it to 1 prevents any reordering of explicit JOIN
s. Thus, the explicit join order specified in the query will be the actual order in which the relations are joined. Because the query planner does not always choose the optimal join order, advanced users can elect to temporarily set this variable to 1, and then specify the join order they desire explicitly. For more information see explicit-joins.
Setting this value to geqo_threshold or more may trigger use of the GEQO planner, resulting in non-optimal plans. See runtime-config-query-geqo.