Skip to content

Add ClickBench short-queries perf test on a single Parquet file - #104368

Merged
alexey-milovidov merged 1 commit into
masterfrom
perf-clickbench-parquet-short
May 8, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
perf-clickbench-parquet-short

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented May 8, 2026 •

Copy link
Copy Markdown
Member

Adds tests/performance/clickbench_parquet_short.xml: a regression guard for short ClickBench queries running against a single Parquet file via the file table function. The fixture is generated on the fly with generateRandom, so no large external download is needed.

The synthetic file mirrors the ClickBench hits schema (105 columns), with 1M rows split into ~16 row groups (output_format_parquet_row_group_size = 50000) so that the single-file Parquet read path's bucketing across multiple sources is actually engaged on multi-core CI runners.

The query set is the short subset of ClickBench (Q1, Q2, Q3, Q4, Q7, Q19) plus Q20 as a heavy-scan counterweight:

  • short queries (COUNT(*), light aggregates, MIN/MAX, point-lookup filter) catch per-query startup-overhead regressions in the Parquet read path — e.g. trivial-count cache bypassed when bucketing engages, or the footer parsed once per bucket without a cache. These add tens to hundreds of milliseconds per query, which is invisible on heavy queries but multiplies short ones by 3x-12x.
  • Q20 (URL LIKE '%google%') is the heavy text scan that bucket-splitting is meant to speed up — a healthy change keeps the short queries flat and ideally improves Q20.

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Version info

  • Merged into: 26.5.1.445

@clickhouse-gh

clickhouse-gh Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [8d61ee1]

Summary: ✅


AI Review

Summary

This PR adds a new performance test, tests/performance/clickbench_parquet_short.xml, to guard short ClickBench-style queries on a single synthetic Parquet file generated in-place. The change is scoped to test coverage, aligns with the stated motivation, and I did not find correctness, safety, or policy issues that require changes.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ➖
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label May 8, 2026
@ClickHouse ClickHouse deleted a comment from CLAassistant May 8, 2026
Adds tests/performance/clickbench_parquet_short.xml: a regression guard for
short ClickBench queries running against a single Parquet file via the
`file()` table function. Generates the fixture on the fly so no large
download is required.

The fixture mirrors the ClickBench `hits` schema (105 columns) with 1M rows
split into ~16 row groups so the single-file Parquet read path's bucketing
across multiple sources is engaged. The query set is the short subset of
ClickBench (Q1/Q2/Q3/Q4/Q7/Q19) plus Q20 as a heavy-scan counterweight.

Motivation: changes to the Parquet read path (e.g. row-group bucketing,
footer-cache invalidation, count-cache bypass) can add a per-query startup
floor of tens to hundreds of milliseconds, which is invisible on heavy
queries but multiplies short queries by 3x-12x. This test catches such
regressions before they reach master.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@alexey-milovidov
alexey-milovidov force-pushed the perf-clickbench-parquet-short branch from 31aab68 to 8d61ee1 Compare May 8, 2026 12:01
@alexey-milovidov alexey-milovidov added the pr-performance Pull request with some performance improvements label May 8, 2026
@alexey-milovidov alexey-milovidov self-assigned this May 8, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue May 8, 2026
Merged via the queue into master with commit 4d547b7 May 8, 2026
165 checks passed
@alexey-milovidov
alexey-milovidov deleted the perf-clickbench-parquet-short branch May 8, 2026 13:58
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-ci pr-performance Pull request with some performance improvements pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants