Dynamic PricingClickHouse Workshops
Dynamic pricingDynamic pricing · Reference

Measure query performance

Compare equal facts and separate client time from server evidence.

Your computer
macOS terminal: Run workshop commands in Terminal using zsh or bash.

Use the same district, active run, applied branch, and exclusive cutoff for raw and aggregate queries. Historical rows and active-run live rows form the population. Every measured result must match; a mismatch invalidates the comparison.

workshop retail-benchmark performs one warmup per query, alternates query order, and records at least 20 samples per query. It disables the result cache and leaves storage caches intact. p50/p95 use nearest-rank percentiles.

FieldInterpretation
client_secondsTotal client wait, including transport and server execution.
server_secondsQuery-log duration in milliseconds divided by 1,000.
read_rows / read_bytesWork read by the query, not rows returned.
memory_usageQuery-log memory metric for that query ID.
equalEvery sample matched the same business facts.
performance_completeServer query-log records were available for every measured sample.
active_partsCurrent table part counts and disk size.
liveActual recent applied transaction rate, not the requested writer setting.

Missing server logs remain null. Do not substitute client duration or zero for missing server evidence. Record service sizing, replicas, region, cache conditions, and observed throughput when sharing a benchmark. Repeat with ingestion paused and running. Do not promise a fixed speedup from a small fixture or a single sample.

The workbench's displayed query duration is client elapsed time. A forecast's expected revenue is not a measured benchmark and is not an observed retail result.

JA