HIFI’s migration from BigQuery to ClickHouse
HIFI moved music royalty analytics from BigQuery to ClickHouse because BigQuery's per-query pricing discouraged exploratory use and slot reservations didn't fit a startup's shifting workloads. Dashboard loads for accounts with 25M+ rows dropped from up to 30 seconds (with timeouts) to a few seconds. The migration surfaced ClickHouse-specific join behaviour: bulk updates work better via a Join engine table and joinGet, and LEFT joins from PostgreSQL to large ClickHouse tables can exhaust memory because the hash join loads the right side into memory, which pre-aggregating the right side with GROUP BY fixes (under 1 second). A community Node.js client also silently converted NULLs to empty strings on insert, which they patched.
Related posts
- ClickHouse vs BigQuery: Using ClickHouse to Serve Real-Time Queries on Top of BigQuery Data
ClickHouse mediumAdept
ClickHouse can sit alongside BigQuery to serve sub-second, high-concurrency analytical queries for real-time applications, while BigQuery remains the warehouse for ad-hoc deep analysis. The guide maps BigQuery types to narrower ClickHouse types and codecs, and avoids Nullable columns to save storage. It bulk-exports the public Ethereum dataset to GCS as sharded gzip CSV, then loads it in parallel with s3Cluster and parallel_distributed_insert_select; the 16.5M-row blocks table imports in about 23 seconds. It also covers continuously appending new rows using BigQuery scheduled queries and Google Dataflow/Apache Beam, keyed on a time dimension.
- ClickHouse and PostgreSQL - a Match Made in Data Heaven - part 1
ClickHouse mediumAdept
ClickHouse can query PostgreSQL data in place through the postgresql table function and the PostgreSQL table engine. Simple WHERE clauses are pushed down to Postgres, while aggregation, joins, sorting and LIMIT run in ClickHouse. On the 28M-row UK house price dataset, a low-selectivity filter makes Postgres choose a parallel sequential scan over the index, taking about 28s, and querying through ClickHouse gives similar times because Postgres still does the scan. Queries using ClickHouse-specific functions such as toYear are not pushed down and can run much slower. Rewriting joins with conditional aggregates like medianIf, or copying the data into local MergeTree tables, is what delivers the large speedups.
- Trade secrets: How Coinhall uses ClickHouse to power its blockchain data platform
ClickHouse easyNovice
Coinhall, an omnichain trading terminal aggregating swap data from 23 blockchains, moved from BigQuery (about 2-second queries, thousands of dollars per month) to QuestDB and then to self-hosted ClickHouse. In Coinhall's comparison against Rockset, SingleStore and Snowflake, ClickHouse ran candlestick queries in 20 ms, latest-price queries in 8 ms and ASOF JOINs in 50 ms, on a 4 vCPU / 16 GB server costing about $50 a month. After migrating, the team tuned queries around sparse primary indexes and replaced full-table LIMIT BY scans with aggregating tables fed by materialized views. They also avoided or simplified sort-merge joins.
- Why BigQuery can’t match ClickHouse Cloud for real-time analytics
ClickHouse mediumAdept
In the CostBench benchmark, ClickHouse Cloud and BigQuery ingest 113.2 billion stock quotes at a target of 1M rows/s while aggregate and drill-down queries run continuously, and ClickHouse Cloud scores 438× better end-to-end performance per dollar under BigQuery Capacity pricing and 512× under On-demand. ClickHouse wins all three components: preparation cost ($28.69 vs $243–265), normalized query cost (~$0.05 vs $4.75–24.80) and accumulated query runtime (58 seconds vs 49 minutes). The gap is traced to the fresh-data path. ClickHouse ingest nodes sort raw data and compute incremental materialized-view aggregates from the same async-insert flush. BigQuery's Storage Write API, automatic reclustering and MV refresh (minimum one-minute interval) each advance separately, which leaves more work for queries.
- Behind the music: How Chartmetric is scaling music analytics with ClickHouse
ClickHouse mediumAdept
Chartmetric moved time-series and playlist workloads from Postgres and Snowflake to ClickHouse Cloud, cutting RDS storage from 28 TB to 18 TB and bringing queries that timed out at 60 seconds down to under 3 seconds. Projections, one sorted by recent modification and one by ISRC, fixed hourly sync jobs that had been timing out on tables ordered for API access. Replacing large JOINs with WHERE + IN filters and LIMIT/OFFSET batching cut one query from a 30 GB out-of-memory failure to 98 ms and 300 MB. The playlist cache, built on VersionedCollapsingMergeTree, now holds 5.5B rows in 340 GB, refreshes every five minutes, and answers top-artist queries in about 1.5 seconds versus 20 in Snowflake.