ClickHouse 26.11 searches join orders exhaustively by default—but not above 10 tables
The new planner can move a selective semi join ahead of a much larger inner join. ClickHouse’s own demo shows why that matters, and where the new default stops.
ClickHouse 26.11 changes how the database chooses the order in which to join tables. In its Dec. 1 release write-up, ClickHouse says the version was already out and identifies a new join optimizer as the default. The release presentation spells out the cutoff: the new optimizer searches exhaustively for queries joining up to 10 tables; larger queries fall back to a greedy algorithm.
Why the order matters
The new optimizer, DPsub, uses dynamic programming to search possible join trees. The release presentation says it checks for conflicts so it can consider legal reorderings involving LEFT, RIGHT, FULL, SEMI and ANTI joins, not just inner joins. That does not mean arbitrary reordering is safe: the point of checking for conflicts is to avoid changing which rows the query returns.
In ClickHouse’s three-table demo, the query sums values from a big table and a medium-size table, retaining only keys present in a tiny third table. One plan joins the first two tables and checks the tiny table later, producing 504 million intermediate rows. The DPsub plan applies the semi join to the big table first, then joins that smaller result to the medium-size table. The presentation reports 1 million intermediate rows for that plan and a runtime of 0.008 seconds with DPsub versus 0.26 seconds with the greedy planner. Those are ClickHouse’s numbers for one demonstration query, not an independent test or a speedup to expect across workloads.
What to check before retuning generated SQL
Start with a slow query you actually run. Compare its plan and runtime before and after the upgrade with the same data and comparable settings. For an analytics agent, include both a small join with a selective filter and a wider query that crosses the 10-table cutoff. Check whether the plan filters early and whether runtime or memory improves before changing how the agent writes its SQL. The release changes how ClickHouse can execute a query; it does not make a query that joins on the wrong business key correct.
sources
- ClickHouse Engineering: ClickHouse release 26.11 (Dec. 1, 2026)clickhouse.com
- ClickHouse 26.11 release presentation: A new JOIN order optimizerpresentations.clickhouse.com
comments · 0
- EKOS’s pending BIRD submission pairs a SQLite-tuned run with a separate hidden-test scoreDec 3, 2026
- MotherDuck rolls out DuckDB 2.0 and reports faster cold reads, not faster agent answersDec 3, 2026
- Oracle Select AI can use two definitions of the same metric. Source order won’t break the tieDec 3, 2026