Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

ClickHouse 39 min read How-to mediumAdept

Optimizing Analytical Workloads: Comparing Redshift vs ClickHouse

ClickHouse stored the same Ethereum dataset in about half the space of an ANALYZE COMPRESSION-tuned Redshift schema (488 GiB vs 826 GiB). A single 60-core ClickHouse Cloud node also ran the 42-query ClickBench workload about 2.5x faster on average than a 2-node dc2.8xlarge Redshift cluster. Two Redshift limits are named as the main obstacles for real-time analytics: first-run query compilation overhead of up to 2s and a concurrency cap of 50. The post also covers type mapping and options for bulk migration and continuous sync between the two systems using AWS EventBridge, Lambda and Glue.

Related posts

  • Why Redshift Serverless can’t match ClickHouse Cloud for real-time analytics

    ClickHouse hardMaster

    In a CostBench continuous-ingestion test streaming 113.2 billion stock quotes at a target of 1M rows/s, ClickHouse Cloud scored 1,996× better end-to-end performance per dollar than Redshift Serverless. The score is preparation cost plus normalized query cost, multiplied by accumulated query runtime. The measured components were $28.69 vs $522.03 preparation (Redshift's MSK plus a 32-RPU writer), $0.05 vs $24.97 query cost, and 58 seconds vs 1.69 hours of runtime. The gap traces to ClickHouse sorting and pre-aggregating each async-insert block at insert time into MergeTree and AggregatingMergeTree tables. Redshift instead runs streaming ingestion, background sorting and incremental MV refreshes as separate stages, so queries hit unfinished preparation.

  • Why Flock Safety turned to ClickHouse for real-time vehicle traffic analytics

    ClickHouse mediumAdept

    Flock Safety replaced a once-daily Redshift, DBT, Prefect and QuickSight SPICE pipeline with ClickHouse Cloud. The old setup had refreshes of up to four hours during which data was unavailable, and SPICE capped datasets at 1TB or 1 billion rows. Before choosing ClickHouse, the team found direct Redshift queries hit concurrency limits, and both Aurora PostgreSQL and S3 with Trino exceeded QuickSight's query timeouts. The new design ingests ML predictions via SNS, Firehose, S3 and ClickPipes (peaking above 20 MB/s, over 1 billion predictions a day) and uses materialized views with uniqState into AggregatingMergeTree tables, so transformation happens on insert and DBT and Prefect are no longer needed. QuickSight now queries ClickHouse directly, with queries finishing in under five seconds, no downtime and longer retention.

  • 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.

  • How Rokt Achieved Real-time Reporting with ClickHouse

    ClickHouse easyNovice

    Rokt replaced an Elasticsearch-backed reporting layer with ClickHouse. Elasticsearch lacked flexible group-by and filtering, had no S3 loading or joins, required JSON queries, and forced full re-ingestion whenever a label changed. After ruling out Pinot, Druid, Snowflake, StarRocks and Citus, the team benchmarked ClickHouse against Redshift: ClickHouse was about 3x cheaper, handled up to 200 queries per second with a maximum query time of six seconds, and stored 500 GB of gzipped Parquet in roughly the same space, about one sixth of the Elasticsearch footprint. The current self-managed setup runs ClickHouse in an autoscaling group with ZooKeeper behind network load balancers, and Rokt plans to move to ClickHouse Cloud to offload replication, sharding and backups.

  • 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.

The quest for software engineering knowledge.

Look:
Layout: