Tips & Tricks to Keep Your Queries under 100ms with ClickHouse®
summary
Claims sustained p99 under 100ms at 100–500 qps on ClickHouse with a 4‑replica cluster holding 177 billion rows and examples querying ~170 million rows. Key levers: minimize scan size (sorting key, low_cardinality, LC4 codec, split columns), reduce algorithmic complexity (filter before group by, lower cardinality before joins, prefer IN over large joins), precompute with materialized views and periodic snapshots, and limit concurrency (set max_threads=1 for many endpoints). Compression and partition choices show two‑order storage differences and large runtime wins.
AI-written summary · about
chapters (8)
- 0:00Introduction and goals
- 2:31Measuring query performance
- 5:53Reducing scan size
- 9:35Query optimization techniques
- 20:50Design principles
- 26:28Materialized views
- 30:56Architecture and scaling
- 36:33Q&A and conclusion
related talks
42mClickHouse: what is behind the fastest columnar database
30mBuilding For Fast
42mOptimizing ClickHouse query performance
57mQuery Performance Analysis in ClickHouse
51mWhat You Need to Know About ClickHouse Architecture
59mEffective Use of ClickHouse
45mClickHouse: what is behind the fastest columnar database
37mFinding Bottlenecks in ClickHouse: Profiling, Heatmaps & Flamegraphs
