内核 海量事件的 ad-hoc 全表扫描
- 一句话
- 向量化执行(SIMD)+ 列存 + 稀疏主键索引三者叠加,让每天数十亿到数万亿事件的明细即席查询秒级返回——查询模式不可预知也无需预先建索引。Vectorized execution (SIMD) + columnar storage + sparse primary-key indexes, combined: sub-second ad-hoc queries over billions to trillions of daily events — with no need to pre-build indexes for unknown query patterns.
- 窄场景
- 日志/可观测性/埋点场景里工程师的即席追问;无专职 DBA 调索引、查询模式事先不可枚举的小而精数据团队。预聚合/固定报表场景收益弱。Engineers doing unpredictable ad-hoc exploration over logs/observability/analytics events; small, sharp data teams with no dedicated DBA tuning indexes. Little benefit for pre-aggregated, fixed-report workloads.
- 机制
- SIMD 批处理列向量只读需要的列,稀疏索引按 granule 跳过数据块(索引极小、常驻内存);LowCardinality/ZSTD 压缩压存储成本。对比 Druid 摄入时 rollup——牺牲明细 ad-hoc 换查询快;ClickHouse 存明细、查时算,灵活度完全不同。SIMD processes column batches reading only the columns needed; sparse indexes skip granules of data (tiny indexes, resident in memory); LowCardinality/ZSTD compression cuts storage cost. Contrast with Druid's ingest-time rollup — fast queries at the cost of raw-detail ad-hoc ability; ClickHouse stores raw detail and computes at query time.
- 生产验证
- Cloudflare 近十年生产,2025 年 8 月 meetup 现场演示单查询扫描 96 万亿事件/小时 <2 秒(https://clickhouse.com/blog/cloudflare);eBay Sherlock 可观测性平台从 Druid 迁移(800 万 metrics/秒、10 亿原始事件/分钟)(https://altinity.com/webinarspage/migrating-from-druid-to-next-gen-olap-on-clickhouse-ebays-experience);Vimeo 评估 Druid/MemSQL/HBase+Phoenix 后选 ClickHouse,对 Phoenix on HBase 查询快 10 倍(https://medium.com/vimeo-engineering-blog/clickhouse-is-in-the-house-413862c8ac28)。Cloudflare, in production for nearly a decade — a live demo at the Aug-2025 meetup scanned 96 trillion events/hour in under 2 seconds (https://clickhouse.com/blog/cloudflare); eBay Sherlock observability platform migrated from Druid (8M metrics/sec, 1B raw events/min) (https://altinity.com/webinarspage/migrating-from-druid-to-next-gen-olap-on-clickhouse-ebays-experience); Vimeo evaluated Druid/MemSQL/HBase+Phoenix, chose ClickHouse — 10x faster queries than Phoenix on HBase (https://medium.com/vimeo-engineering-blog/clickhouse-is-in-the-house-413862c8ac28).
- 竞品差距
- Druid 5-6 种节点类型运维重(HN 原话:"ClickHouse requires a single node type");ES/OpenSearch 聚合扫描慢、存储贵(迁移案例称存储降 70-85%、聚合快 5-50 倍);StarRocks 扫描接近但更新/高并发评测被反超;DuckDB 无分布式,规模天花板不同。Druid needs 5-6 node types to operate (HN: "ClickHouse requires a single node type"); Elasticsearch/OpenSearch aggregate scans are slow and storage-heavy (migration reports cite 70-85% storage reduction, 5-50x faster aggregations); StarRocks is close on pure scan but loses on update/high-concurrency benchmarks; DuckDB has no distribution, so a different scale ceiling.
- 证据等级
- 社区共识 + 独立实测 + 生产验证Community consensus + independent benchmarks + production validation
- 最后核验
- 2026-10-012026-10-01