---
title: "HIFI’s migration from BigQuery to ClickHouse"
description: "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."
url: "https://swe.quest/articles/hifi-s-migration-from-bigquery-to-clickhouse-5318550bbb72f66e"
canonical: "https://clickhouse.com/blog/hifis-migration-from-bigquery-to-clickhouse"
source: "ClickHouse"
published: "2023-01-09"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["analytics","sql","databases","javascript"]
---

# HIFI’s migration from BigQuery to ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2023-01-09, 8 min read, Case study. Original: [https://clickhouse.com/blog/hifis-migration-from-bigquery-to-clickhouse](https://clickhouse.com/blog/hifis-migration-from-bigquery-to-clickhouse)

## Summary

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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- SQL joins ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

ClickHouse, BigQuery, PostgreSQL, Join engine, joinGet, Grace Hash join, ClickHouse Cloud

## Related posts

- [ClickHouse vs BigQuery: Using ClickHouse to Serve Real-Time Queries on Top of BigQuery Data](https://swe.quest/articles/clickhouse-vs-bigquery-using-clickhouse-to-serve-real-time-queries-on-top-of-2c9e02d14f552560.md): ClickHouse · 2023-02-27 · Medium · 25 min read · Analytics & OLAP, Data pipelines, Cloud platforms, SQL
  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.
- [ClickHouse and PostgreSQL - a Match Made in Data Heaven - part 1](https://swe.quest/articles/clickhouse-and-postgresql-a-match-made-in-data-heaven-part-1-7c7668b9b4913b70.md): ClickHouse · 2022-12-20 · Medium · 18 min read · Analytics & OLAP, PostgreSQL, Query engines, Performance engineering, SQL
  ClickHouse can query PostgreSQL data in place through the postgresql table function and the PostgreSQL table engine.
- [Trade secrets: How Coinhall uses ClickHouse to power its blockchain data platform](https://swe.quest/articles/trade-secrets-how-coinhall-uses-clickhouse-to-power-its-blockchain-data-platform-a19f7fb99396fe78.md): ClickHouse · 2024-08-14 · Easy · 5 min read · Analytics & OLAP, Databases, Performance engineering, Cost optimization
  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.
- [Why BigQuery can’t match ClickHouse Cloud for real-time analytics](https://swe.quest/articles/why-bigquery-can-t-match-clickhouse-cloud-for-real-time-analytics-fd197ffd824251d5.md): ClickHouse · 2026-10-08 · Medium · 19 min read · Analytics & OLAP, Performance engineering, Cost optimization, Cloud platforms, Data pipelines
  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.
- [Behind the music: How Chartmetric is scaling music analytics with ClickHouse](https://swe.quest/articles/behind-the-music-how-chartmetric-is-scaling-music-analytics-with-clickhouse-8636babde296e87c.md): ClickHouse · 2026-01-08 · Medium · 7 min read · Analytics & OLAP, Performance engineering, Databases, SQL
  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.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
