---
title: "How GitLab serves sub-second analytics to 50 million users"
description: "GitLab moved its user-facing product analytics from Postgres to ClickHouse after dashboards repeatedly hit its 15-second performance ceiling."
url: "https://swe.quest/articles/how-gitlab-serves-sub-second-analytics-to-50-million-users-cabf627f25c869fd"
canonical: "https://clickhouse.com/blog/how-gitlab-uses-clickhouse-to-scale-analytical-workloads"
source: "ClickHouse"
published: "2025-10-21"
difficulty: "easy"
kind: "Case study"
reading_minutes: 10
tags: ["analytics","postgres","databases","scalability"]
---

# How GitLab serves sub-second analytics to 50 million users

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-10-21, 10 min read, Case study. Original: [https://clickhouse.com/blog/how-gitlab-uses-clickhouse-to-scale-analytical-workloads](https://clickhouse.com/blog/how-gitlab-uses-clickhouse-to-scale-analytical-workloads)

## Summary

GitLab moved its user-facing product analytics from Postgres to ClickHouse after dashboards repeatedly hit its 15-second performance ceiling. Hierarchical multi-join queries over 100M+ rows dropped from 30–40 seconds to 0.24 seconds, and ClickHouse is now the default OLAP engine across GitLab.com, Dedicated and self-managed deployments. A hybrid data access layer routes queries between Postgres and ClickHouse, ingestion runs as TSV over HTTP plus an in-house CDC framework (Siphon), and materialized views are the main optimization tool. The team built and ran its own ClickHouse operator on object storage before moving SaaS to ClickHouse Cloud, and warns against self-managing unless required. It also flags poor visibility into background mutations as an ongoing operational pain.

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)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)

## Prerequisites

- OLTP vs OLAP databases ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))

## Keywords

ClickHouse, GitLab, ClickHouse Cloud, PostgreSQL, SharedMergeTree, Siphon, GitLab Duo

## Related posts

- [London Meetup Report: Scaling Analytics with PostHog and Introducing HouseWatch](https://swe.quest/articles/london-meetup-report-scaling-analytics-with-posthog-and-introducing-housewatch-ed6b50855ec52fa1.md): ClickHouse · 2023-07-05 · Medium · 4 min read · Analytics & OLAP, Performance engineering, Observability, Databases
  PostHog scaled its product analytics platform by moving from Postgres to ClickHouse, with an events table holding roughly 62 TB uncompressed for a single column.
- [“Just OLAP it”: How Ramp rebuilt its analytics platform on ClickHouse Cloud](https://swe.quest/articles/just-olap-it-how-ramp-rebuilt-its-analytics-platform-on-clickhouse-cloud-36298842faab88cc.md): ClickHouse · 2026-01-20 · Medium · 5 min read · Analytics & OLAP, Event-driven architecture, Data pipelines, PostgreSQL, Queues & messaging
  Ramp moved customer-facing spend analytics off its Postgres monolith after enterprise customers' reports on a single card-transactions table began taking 40+ seconds, and now serves them in milliseconds from ClickHouse Cloud.
- [98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse](https://swe.quest/articles/98-faster-queries-50-lower-cloud-costs-verihubs-journey-from-postgres-to-f6535061aff525b1.md): ClickHouse · 2026-07-06 · Medium · 6 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Event-driven architecture
  Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack.
- [Lago - Using ClickHouse to Scale an Events Engine](https://swe.quest/articles/lago-using-clickhouse-to-scale-an-events-engine-c476ec4bca3b5c9d.md): ClickHouse · 2024-05-29 · Medium · 7 min read · Analytics & OLAP, PostgreSQL, Payments & fintech, Performance engineering, Databases
  Lago, an open-source usage-based billing platform ingesting millions of events per minute, moved its streamed billable events from Postgres to ClickHouse Cloud and kept Postgres for all other transactional data.
- [How Polymarket scaled their data stack with Postgres and ClickHouse](https://swe.quest/articles/how-polymarket-scaled-their-data-stack-with-postgres-and-clickhouse-59e5246433cf4cae.md): ClickHouse · 2026-01-21 · Medium · 6 min read · Analytics & OLAP, PostgreSQL, Data pipelines, Scaling
  Polymarket moved analytical workloads off its production PostgreSQL cluster and onto ClickHouse after internal Hex dashboards started timing out and scheduled leaderboard aggregations competed with transactional trading traffic.

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)
