---
title: "100x Faster: GraphQL Hive migration from Elasticsearch to ClickHouse"
description: "GraphQL Hive replaced Elasticsearch with ClickHouse for storing per-request GraphQL monitoring data (consumer, requested fields, latency, request body) after query latency degraded with data growth and one large tenant slowed queries for smaller ones."
url: "https://swe.quest/articles/100x-faster-graphql-hive-migration-from-elasticsearch-to-clickhouse-57650bfdbf95d1a8"
canonical: "https://clickhouse.com/blog/100x-faster-graphql-hive-migration-from-elasticsearch-to-clickhouse"
source: "ClickHouse"
published: "2022-11-03"
difficulty: "easy"
kind: "Case study"
reading_minutes: 4
tags: ["analytics","observability","graphql","databases","performance"]
---

# 100x Faster: GraphQL Hive migration from Elasticsearch to ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2022-11-03, 4 min read, Case study. Original: [https://clickhouse.com/blog/100x-faster-graphql-hive-migration-from-elasticsearch-to-clickhouse](https://clickhouse.com/blog/100x-faster-graphql-hive-migration-from-elasticsearch-to-clickhouse)

## Summary

GraphQL Hive replaced Elasticsearch with ClickHouse for storing per-request GraphQL monitoring data (consumer, requested fields, latency, request body) after query latency degraded with data growth and one large tenant slowed queries for smaller ones. On a 20M-row benchmark where one user owned half the rows, percentile queries took ~10s on Elasticsearch, ~5s on InfluxDB (which struggled with high cardinality), ~3s on TimescaleDB and ~100ms on ClickHouse. Druid was skipped as too complex. Because data had a 30-day TTL, the team dual-wrote to both stores for a month and then switched reads with zero downtime, reporting a 100x average improvement and growth from millions to billions of rows per month. They are now moving to ClickHouse Cloud for sharding and replication.

Written by swe.quest, not by the author.

**Difficulty:** Easy: no special background needed; explains what something is and why it matters

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [GraphQL](https://swe.quest/tags/graphql.md) (Backend & APIs)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)

## Prerequisites

- GraphQL basics ([easy posts on GraphQL](https://swe.quest/tags/graphql.md?difficulty=easy))
- OLAP databases ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse, Elasticsearch, GraphQL Hive, TimescaleDB, InfluxDB, Druid, ClickHouse Cloud

## Related posts

- [Contentsquare Migration from Elasticsearch to ClickHouse](https://swe.quest/articles/contentsquare-migration-from-elasticsearch-to-clickhouse-052c118198db3e2f.md): ClickHouse · 2022-10-11 · Medium · 6 min read · Analytics & OLAP, Refactoring & migrations, Distributed databases, Performance engineering, Cost optimization
  Contentsquare replaced 14 Elasticsearch clusters with ClickHouse over a phased migration.
- [Didi Migrates from Elasticsearch to ClickHouse for a new Generation Log Storage System](https://swe.quest/articles/didi-migrates-from-elasticsearch-to-clickhouse-for-a-new-generation-log-storage-50fcb56512cab39a.md): ClickHouse · 2024-04-19 · Medium · 11 min read · Analytics & OLAP, Observability, Storage engines, Scaling, Cost optimization
  Didi replaced Elasticsearch with ClickHouse for petabyte-per-day log and trace storage, cutting machine cost by 30% and speeding up queries about 4x on a 400+ node single-replica deployment peaking at 40 GB/s writes and ~200 QPS.
- [How HighLevel rebuilt its data platform for speed, scale, and simplicity on ClickHouse Cloud](https://swe.quest/articles/how-highlevel-rebuilt-its-data-platform-for-speed-scale-and-simplicity-on-826417013669e8fd.md): ClickHouse · 2026-01-12 · Medium · 8 min read · Analytics & OLAP, Databases, Scaling, Observability
  HighLevel replaced MySQL, Elasticsearch, Firestore and a document database with ClickHouse Cloud for lead activity, workflow logs, notifications and billing dashboards.
- [Why Front migrated from Elasticsearch to ClickHouse for “pixel-perfect” analytics at scale](https://swe.quest/articles/why-front-migrated-from-elasticsearch-to-clickhouse-for-pixel-perfect-analytics-882b7386f623bf53.md): ClickHouse · 2026-11-18 · Easy · 7 min read · Analytics & OLAP, Databases, Developer productivity
  Front moved customer-facing analytics for 9,000+ B2B companies off a 200-node, 25 TB Elasticsearch cluster and onto ClickHouse Cloud.
- [How trip.com migrated from Elasticsearch and built a 50PB logging solution with ClickHouse](https://swe.quest/articles/how-trip-com-migrated-from-elasticsearch-and-built-a-50pb-logging-solution-with-079ade1f405efcf8.md): ClickHouse · 2024-06-12 · Medium · 16 min read · Analytics & OLAP, Observability, Scaling, Cost optimization, Databases
  Trip.com replaced its Elasticsearch-based centralized logging platform with ClickHouse after hitting stability, ingestion and cost limits at 4PB, and has since grown it toward 50PB.

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)
