---
title: "How Infinitas Learning uses ClickHouse Managed Postgres to process billions of events for 1.6M unique learners"
description: "Infinitas Learning runs transactional learner-result processing on Postgres, with PL/pgSQL functions serving as the API in place of an earlier Kafka/Flink event-sourced pipeline, and customer-facing analytics on ClickHouse."
url: "https://swe.quest/articles/how-infinitas-learning-uses-clickhouse-managed-postgres-to-process-billions-of-eb20c949118daba4"
canonical: "https://clickhouse.com/blog/infinitas-learning-clickhouse-managed-postgres"
source: "ClickHouse"
published: "2026-11-16"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["analytics","postgres","performance","caching","databases"]
---

# How Infinitas Learning uses ClickHouse Managed Postgres to process billions of events for 1.6M unique learners

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-11-16, 9 min read, Case study. Original: [https://clickhouse.com/blog/infinitas-learning-clickhouse-managed-postgres](https://clickhouse.com/blog/infinitas-learning-clickhouse-managed-postgres)

## Summary

Infinitas Learning runs transactional learner-result processing on Postgres, with PL/pgSQL functions serving as the API in place of an earlier Kafka/Flink event-sourced pipeline, and customer-facing analytics on ClickHouse. Migrating Postgres from Neon to ClickHouse Managed Postgres took two days: 750 GB copied in 16 hours and a zero-downtime cutover via logical replication. P50 fell to double-digit microseconds. On the analytics side, tail latency spikes of up to 13 s came from cache misses on a high-cardinality UUID primary key combined with continuous inserts. The team self-hosted ClickHouse, returned to Cloud after merge and read tuning with support, and then used distributed cache prewarming to bring P99 to 410 ms against a 500 ms SLA.

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)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Caching](https://swe.quest/tags/caching.md) (Backend & APIs)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)

## Prerequisites

- Postgres basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- OLAP databases ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- Logical replication ([easy posts on Replication](https://swe.quest/tags/replication.md?difficulty=easy))

## Keywords

ClickHouse, ClickHouse Managed Postgres, ClickHouse Cloud, Neon, pg\_clickhouse, ClickPipes, Apache Kafka, Apache Flink

## Related posts

- [How we migrated Clera’s 500 GB production database to ClickHouse Managed Postgres overnight](https://swe.quest/articles/how-we-migrated-clera-s-500-gb-production-database-to-clickhouse-managed-f4ed327a88d71cd7.md): ClickHouse · 2026-10-08 · Medium · 8 min read · PostgreSQL, Databases, Performance engineering, Schema migrations, Storage systems
  Clera moved a 500 GB, 500+ table production Postgres database from the EU to the US overnight onto ClickHouse Managed Postgres, with production traffic still running, using two parallel ClickPipes pipelines.
- [How Socialpruf built a faster, more reliable data stack by replacing Neon with Postgres managed by ClickHouse](https://swe.quest/articles/how-socialpruf-built-a-faster-more-reliable-data-stack-by-replacing-neon-with-ba1cc6a2c844f08b.md): ClickHouse · 2026-03-17 · Easy · 7 min read · PostgreSQL, Analytics & OLAP, Schema migrations, Databases, Cost optimization
  Socialpruf, a social analytics platform ingesting hundreds of posts per second, moved customer-facing dashboard queries from Postgres to ClickHouse via CDC, cutting multi-second load times to millisecond aggregations.
- [Postgres at Open House NYC](https://swe.quest/articles/postgres-at-open-house-nyc-5b2de1c38cc64f40.md): ClickHouse · 2026-10-13 · Easy · 6 min read · PostgreSQL, Replication, Event-driven architecture, Analytics & OLAP
  ClickHouse used its Open House NYC keynote to launch WalShadow, an open-source engine that replicates Postgres into ClickHouse from the physical WAL instead of logical replication.
- [A universal interface: How QuintoAndar made ClickHouse plug-and-play with managed Postgres](https://swe.quest/articles/a-universal-interface-how-quintoandar-made-clickhouse-plug-and-play-with-ec413a5dd96fc04f.md): ClickHouse · 2026-08-27 · Easy · 6 min read · Analytics & OLAP, PostgreSQL, Data pipelines, System design
  QuintoAndar's customer data platform replaced a Lambda architecture (a Postgres hot layer plus Kafka Connect into a Delta landing zone processed by 24/7 Databricks jobs with costly MERGE INTO deduplication) by having its event gateway write about 900 million monthly events directly into ClickHouse Cloud, which also serves roughly 300 million API requests a month with sub-second reads.
- [How Kami scaled from 80M to nearly 2B events per week with ClickHouse](https://swe.quest/articles/how-kami-scaled-from-80m-to-nearly-2b-events-per-week-with-clickhouse-77ce1b06efbf532e.md): ClickHouse · 2025-05-16 · Medium · 7 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Scaling, Schema migrations
  Kami's Postgres event tracking (Rails writing JSONB rows, queried via Redash) collapsed when COVID pushed weekly events from about 80M to nearly 2B.

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)
