CostBench: Putting real-time analytics to the test
CostBench measures real-time analytics performance per dollar as one continuous workload: more than 100 billion NBBO stock quotes are streamed at a target of 1 million rows/sec while aggregate and drill-down queries run on a fixed schedule. Its key idea is the fresh-data path, meaning columnar ingestion, maintenance of pruning-friendly sort/cluster layouts, and incremental pre-aggregation. That path carries its own cost, and when it falls behind it pushes scanning and aggregation work onto the query engine. Using each vendor's recommended push-based ingest path, ClickHouse Cloud had the lowest preparation cost, query-serving cost and runtime. Snowflake, Databricks, BigQuery and Redshift Serverless delivered 412–1,996× worse end-to-end performance per dollar, though the benchmark is run and reported by ClickHouse.
Related posts
- The end-to-end cost-performance of real-time analytics: Snowflake vs. ClickHouse Cloud
ClickHouse mediumAdept
CostBench measures real-time analytics cost-performance end to end: continuous ingest at a fixed 1 million rows/sec, keeping raw data ordered for pruning, maintaining fresh pre-aggregations, and serving queries continuously while all of that runs. Using a 12-column stock-quotes dataset sorted by (sym, t), it compares ClickHouse Cloud against two Snowflake setups. The ClickHouse Cloud setup uses a small separate ingest service, a MergeTree raw table and an AggregatingMergeTree incremental materialized view. One Snowflake setup uses standard tables with serverless clustering and materialized views on a Gen2 X-Small ingest warehouse. The other uses Snowflake Interactive Tables. Read compute is matched at 16 Graviton3 cores. Dashboard queries run every 10 minutes and drill-down queries every hour against constantly changing data, with identical client work for both systems.
- Why ClickHouse Cloud wins at real-time analytics
ClickHouse mediumAdept
In the CostBench streaming benchmark (113.2 billion stock quotes ingested at about 1M rows/s while queries ran), ClickHouse Cloud scored 412× to 1,996× better end-to-end performance per dollar than Snowflake, Databricks, BigQuery and Redshift Serverless. Its lead comes from sorting data and computing incremental materialized-view pre-aggregations in memory at insert time, so summaries never lag behind raw data. Background part merges then keep combining the mergeable aggregation states. Ingestion and merging are parallelized across nodes, cores and SIMD lanes, and a 4-core ingest service prepared all the data for $28.69 with 14.4× compression, while the other systems needed separate asynchronous refresh stages that lagged and cost $79–$696.
- Why Databricks can’t match ClickHouse Cloud for real-time analytics
ClickHouse mediumAdept
In a vendor-run CostBench test, ClickHouse Cloud and Databricks each ingested a stream of 113.2 billion stock quotes, targeting 1M rows/s, while aggregate and drill-down queries ran on schedule. ClickHouse Cloud scored 752× better on end-to-end performance per dollar. Its preparation cost was $28.69 versus $695.60, its normalized query cost about $0.05 versus $2.65, and its accumulated query runtime 56 seconds versus 29 minutes. The gap comes from where preparation happens. ClickHouse sorts and pre-aggregates each async-insert block on the ingest nodes. Databricks splits the same work across Zerobus ingestion, asynchronous liquid clustering via Predictive Optimization, and a separate incremental materialized-view refresh pipeline, so its summaries can lag behind incoming data.
- Why Snowflake can’t match ClickHouse Cloud for real-time analytics
ClickHouse mediumAdept
In the CostBench continuous-ingestion benchmark (113.2 billion stock quotes streamed toward 1M rows/s while aggregate and drill-down queries ran on the freshest data), ClickHouse Cloud scored 412× better end-to-end performance per dollar than Snowflake. It led on preparation cost ($28.69 vs $79.42), normalized query cost (~$0.05 vs $15.99) and accumulated query runtime (1.03 minutes vs 2.13 hours). ClickHouse's async inserts sort raw data and update incremental materialized views from the same insert block on a 4-core HA ingest service, so summaries have zero lag. Snowflake splits this across Snowpipe Streaming and a serverless, non-configurable MV refresh, which leaves pre-aggregations about 1.4–2 minutes behind and pushes more work onto queries.
- How the 5 major cloud data warehouses compare on cost-performance
ClickHouse mediumAdept
A vendor-run benchmark extends ClickBench's 43 analytical queries to 1B, 10B and 100B rows and prices the raw runtimes for Snowflake, Databricks, ClickHouse Cloud, BigQuery and Redshift Serverless using each vendor's actual compute billing rules via the open CostBench pipeline. The ClickHouse Cloud configuration ranks best on runtime × cost at every scale. At 100B rows it finishes in about 275 s for about $17.62, while Databricks 4X-Large and Snowflake 4X-Large score 23× and 32× worse and BigQuery On-Demand about 1,350× worse. Runs follow ClickBench's no-tuning rules, use Enterprise-tier pricing in AWS us-east (GCP for BigQuery), and leave storage costs out of the comparison.