ClickBench (OLAP)
Results
Section titled “Results”Machine: c8g.metal-48xl (192 vCPU Graviton3, 384 GB RAM)
| System | Hot Geomean | Load Time | Data Size | Combined Score |
|---|---|---|---|---|
| ParticleDB | 17.0ms | 17.6s | 35.6 GB | 2.92 |
| ClickHouse (web) | 52.0ms | 0s | ~14 GB | 3.93 |
| ClickHouse (direct) | ~65ms | ~12s | ~13 GB | 5.72 |
ParticleDB is #1 Combined on the local ClickBench snapshot, beating ClickHouse by 25% on the official Combined formula (60% hot + 20% cold + 10% load + 10% size).
What is ClickBench?
Section titled “What is ClickBench?”ClickBench is a standardized benchmark of 43 analytical SQL queries against the hits table from Yandex.Metrica web analytics data (100 million rows, 105 columns).
Queries range from simple COUNT(*) to complex multi-column GROUP BY with COUNT(DISTINCT), REGEXP_REPLACE, and HAVING clauses.
Query Categories
Section titled “Query Categories”Fast queries (< 1ms)
Section titled “Fast queries (< 1ms)”COUNT(*)— 0.016ms (O(1) from precomputed metadata)SUM/AVG/MIN/MAX— 0.02ms (resolved from zone map running statistics)COUNT(DISTINCT SearchPhrase)— 0.018ms (O(1) from DictU32 dictionary size)
Medium queries (1-200ms)
Section titled “Medium queries (1-200ms)”- Filtered aggregations with zone map pruning
- Low-cardinality GROUP BY with SIMD mask accumulation
- String GROUP BY with DictU32 encoding (4-byte keys instead of variable-length strings)
Heavy queries (200ms-1s)
Section titled “Heavy queries (200ms-1s)”- Multi-column GROUP BY with millions of groups (radix-partitioned hash tables)
- COUNT(DISTINCT) with per-group hash set tracking
- REGEXP_REPLACE with domain extraction
Key Optimizations
Section titled “Key Optimizations”| Optimization | Impact | Queries |
|---|---|---|
| Zone map running statistics | O(1) for ungrouped aggregates | Q0, Q2, Q3, Q6 |
| DictU32 dictionary encoding | 4x smaller GROUP BY keys | Q12, Q14, Q32, Q41 |
| Inline filter + DictU32 injection | 4.3x on filtered string GROUP BY | Q14 (569→132ms) |
| O(1) COUNT(DISTINCT) via dict.len() | 15,944x on string DISTINCT | Q5 (287→0ms) |
| 2048-partition radix hash tables | L2 cache fit for multi-col | Q18 (-63ms) |
| mimalloc allocator | 15% across all queries | All |
| Thread-local DictU32 build | 48% faster load | Load phase |