Heuristic join enumeration
PostgreSQL switches to a genetic algorithm at 12+ relations (geqo_threshold). Below that, it greedily prefers left-deep trees. Neither path searches the bushy plan space — and both are sensitive to the planner's row estimates.
-- 6+ way joins like TPC-DS Q25
-- left-deep tree picked even when bushy is dramatically cheaper
SELECT ... FROM store_sales
JOIN store_returns ON ...
JOIN catalog_sales ON ...
JOIN customer ON ...
JOIN item ON ...
JOIN date_dim ON ...
GROUP BY ...;