Skip to content

Perf/clickbench improvements#220

Merged
singaraiona merged 3 commits into
masterfrom
perf/clickbench-improvements
Jun 2, 2026
Merged

Perf/clickbench improvements#220
singaraiona merged 3 commits into
masterfrom
perf/clickbench-improvements

Conversation

@singaraiona
Copy link
Copy Markdown
Collaborator

No description provided.

ser-vasilich and others added 3 commits May 30, 2026 15:12
The fused multi-key path already accepts a NULL predicate; only the
planner gate required where_expr.  Allow no-WHERE when n_keys >= 2 AND
count-only.  Single-key no-WHERE and multi-agg over near-unique
composites stay on exec_group's radix — fusing them regresses at very
high cardinality.

ClickBench 10M:
  q16  744 → 154 ms
  total 8.0 → 7.3 s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
mk_compile packs the composite by-key into a 16-byte slot.  An I64
column for minute() (values 0..59) blows the budget on q18's
{UserID, minute, SearchPhrase} composite (~20 bytes) and the query
drops to exec_group.

After eval'ing a computed by-val whose AST head is minute / hh / ss /
dd / dow / mm / doy / yyyy, downcast the I64 result to I16 before
adding it to the table.  I16 is the smallest type that holds every
output range (year up to 32767, doy up to 366) and still prints as
decimal (U8 prints hex, unreadable for a minute value).

Skipped when the source column has nulls.

ClickBench 10M:
  q18  1748 → 449 ms
  total 6.6 → 5.2 s

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
perf(query): fuse no-WHERE multi-key count-only group-by
@singaraiona singaraiona merged commit 9505a86 into master Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants