Type: integer
Default: 8
Min: 1
Max: 2147483647
Context: user
Restart: false

The planner will merge sub-queries into upper queries if the resulting FROM list would have no more than this many items. Smaller values reduce planning time but might yield inferior query plans. The default is eight. 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.

Recommendations

While it's probably true that newer CPUs could support higher collapse_limits, there's not much incremental benefit to just raising either collapse_limit to 10 or 11.

Comments