---
title: "Adding Real Time Analytics to a Supabase Application With ClickHouse"
description: "HouseClick, a demo estate-agency app, keeps ~1000 current listings in Supabase Postgres and serves analytics over the ~30M-row UK house price dataset from ClickHouse Cloud."
url: "https://swe.quest/articles/adding-real-time-analytics-to-a-supabase-application-with-clickhouse-e40be6671b77f55d"
canonical: "https://clickhouse.com/blog/adding-real-time-analytics-to-a-supabase-application"
source: "ClickHouse"
published: "2023-05-15"
difficulty: "medium"
kind: "How-to"
reading_minutes: 16
tags: ["analytics","postgres","system-design","frontend"]
---

# Adding Real Time Analytics to a Supabase Application With ClickHouse

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2023-05-15, 16 min read, How-to. Original: [https://clickhouse.com/blog/adding-real-time-analytics-to-a-supabase-application](https://clickhouse.com/blog/adding-real-time-analytics-to-a-supabase-application)

## Summary

HouseClick, a demo estate-agency app, keeps ~1000 current listings in Supabase Postgres and serves analytics over the ~30M-row UK house price dataset from ClickHouse Cloud. The app first queried ClickHouse directly via its JS client, then switched to Supabase's ClickHouse Foreign Data Wrapper so Postgres pushes queries down to ClickHouse and returns only aggregated results. That gives developers a single SQL interface and lets them join transactional and analytical data without ETL. The post also contrasts OLTP and OLAP workloads and walks through FDW setup, best practices, and options for syncing transactional data into ClickHouse.

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)
- [System design](https://swe.quest/tags/system-design.md) (Architecture & design)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- PostgreSQL extensions ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- OLTP vs OLAP concepts ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))

## Keywords

ClickHouse, Supabase, Foreign Data Wrappers, PostgreSQL, Next.js, Apache ECharts, OpenAI

## Related posts

- [PostgreSQL + ClickHouse as the Open Source unified data stack](https://swe.quest/articles/postgresql-clickhouse-as-the-open-source-unified-data-stack-2760f19ba52907df.md): ClickHouse · 2026-01-27 · Easy · 5 min read · PostgreSQL, Analytics & OLAP, Event-driven architecture, Replication
  An open source stack pairs PostgreSQL as the transactional system of record with ClickHouse for analytics, connected by PeerDB for change data capture and the pg\_clickhouse extension, which transparently offloads analytical queries from Postgres to ClickHouse.
- [ClickHouse Partnership, improved Postgres Replication, and Disk Management](https://swe.quest/articles/clickhouse-partnership-improved-postgres-replication-and-disk-management-fc24b5541354f1b8.md): Supabase · 2024-10-30 · Medium · 4 min read · PostgreSQL, Analytics & OLAP, Replication, Event-driven architecture
  Supabase and ClickHouse are partnering around a Postgres-for-transactions, ClickHouse-for-analytics stack that is becoming common among AI companies.
- [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.
- [“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.
- [What's New in pg\_clickhouse - JSONB Support, SQL value functions, Streaming, and more](https://swe.quest/articles/what-s-new-in-pg-clickhouse-jsonb-support-sql-value-functions-streaming-and-more-ecb202cf6ff32298.md): ClickHouse · 2026-04-24 · Medium · 10 min read · PostgreSQL, Analytics & OLAP, Query engines, Memory management
  pg\_clickhouse, the Postgres foreign data wrapper for querying ClickHouse, now pushes down far more operations to ClickHouse.

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)
