ClickHouse Splits PREWHERE into Read Steps: Bytes per Rejected Row Picks the Order
ClickHouse moves WHERE conditions into PREWHERE by cost per rejected row, and reads PREWHERE columns in separate read steps.
All posts published on this site.
Everything published here, newest first.
ClickHouse moves WHERE conditions into PREWHERE by cost per rejected row, and reads PREWHERE columns in separate read steps.
ClickHouse flattens the join tree into a graph, searches it for a cheaper order, and rebuilds the plan.
ClickHouse’s join cost model is built from NDV counts, min/max ranges and row estimates.
ClickHouse ships three DP join-order searches over a relation-set memo, with a plan budget and a fallback chain.
ClickHouse’s CompactArray stores sub-byte values in a bitset and reads them through an unaligned 16-bit window, so a HyperLogLog rank costs 5 or 6 bits per bucket.