join_collapse_limit
No restart — settable per sessioncount (relations)
How many tables the planner will reorder freely when searching for a join order.
What it does
When a query joins many tables, finding the optimal join order is expensive (it grows fast with table count). join_collapse_limit caps how large a join the planner will fully explore; beyond it, it stops flattening explicit JOIN syntax and largely keeps your written order.
How to tune it
The default 8 balances planning time against plan quality. If a big multi-join query plans well but you suspect a better order exists, raising it (e.g. to 12) lets the planner explore more — at the cost of longer planning. Lowering it (even to 1) forces your JOIN order, occasionally useful as a workaround.