DATA SYSTEMS · INTERACTIVE LAB
Run one logical aggregation across three engines and inspect the physical trade-offs.
The useful question is not “which database wins?” It is “what work did the system avoid, defer, store or repeat?”
100K
1Mone deterministic sales model
START WITH ONE QUESTION
What can these timings tell us—and what can they not tell us?
Recommended sequence
- Choose 100,000 rows so all three engines answer the same bounded analytical question at the same logical scale.
- Run all three once as a warm-up; run again and record the second observation. Cache and startup effects can otherwise dominate.
- Verify result-row counts and logical equivalence before looking at milliseconds. A fast wrong or different answer is not a comparison.
- Compare computation location, physical reuse, rows scanned and bytes read. Mark any metric that an engine cannot report as unavailable—not zero.
- Use latency only as a clue. A defensible performance claim requires repeated runs, controlled cache state, equivalent clients and equivalent storage conditions.
The values are not a product ranking. PostgreSQL reuses a PDO connection; DuckDB includes process startup; ClickHouse uses HTTP and engine-reported elapsed time. Cache, layout and 10K–1M data scale also influence the result.
The displayed value is observed lab latency, not a universal database benchmark. PostgreSQL reuses an open PDO connection; DuckDB starts a subprocess for each request; ClickHouse communicates over HTTP and reports its own engine elapsed time. At only 10K–1M rows, much of the dataset may also remain in cache. Compare query plans, rows and bytes read, freshness and maintenance cost before comparing milliseconds.
CONCEPT
Measure without inventing a universal winner.
The labs use the same logical columns and deterministic formulas, but storage formats, caching and physical layout remain different. Treat timings as observations of this host, not a product ranking.
FAIR COMPARISON
Whitelist only · 25 s timeout · 2 CPU / 2 GB ClickHouse ceiling · one operation at a time
SQL
Select a bounded experiment.Result
Explain / query plan
The physical plan appears after execution.Run an experiment, then connect the measurement to physical work.