92x faster queries: How Open Electricity uses ClickHouse to track Australia’s energy transition in real time
Open Electricity moved the analytical workload behind its public Australian energy API from Postgres/TimescaleDB to ClickHouse, keeping relational data in Postgres. The data is about 1 billion five-minute records, growing by 500k a day. An all-time monthly aggregation dropped from 313 seconds to 3.4 seconds (92x), and to 60 ms with a materialized view, on 4 cores and 4 GB RAM versus Postgres's 16 cores and 32 GB. Lessons from the feature-flagged parallel migration: remember FINAL with ReplacingMergeTree, and encode data completeness into version numbers so partial materialized-view aggregates don't win deduplication. Also standardize on UTC DateTime64 and chunk backfills into 3-day windows of 20k-row batches.
Related posts
- Longbridge Technology simplifies their architecture and achieves 10x performance boost with ClickHouse
ClickHouse mediumAdept
Longbridge, a Singapore online brokerage, replaced a fragmented market-data stack of PostgreSQL (historical), Redis (real-time) and DynamoDB (high-write) with ClickHouse after evaluating it against TimescaleDB and TDengine for write throughput, Decimal support, time functions and aggregations. Historical data was migrated via ClickHouse external tables over OSS and Alibaba Cloud DTS, which merged 128 PostgreSQL sub-tables into one table and converted varchar fields to Decimal; Redis was kept for real-time data with ticker-level writes moved to ClickHouse. Reported results include about 5x compression (500GB down to 100GB), 10x faster single-table writes than PostgreSQL, and built-in aggregation and window functions replacing scheduled statistics jobs.
- Ongage's Strategic Shift to ClickHouse for Real-time Email Marketing
ClickHouse easyNovice
Ongage, an email and SMS marketing automation company processing about half a billion messages a day, moved its campaign analytics and automation reporting from a large AWS RDS MySQL cluster (alongside MongoDB and Redshift) to ClickHouse Cloud. The pipeline loads raw events from S3 with the s3Cluster function and copies around eight MySQL tables in via the MySQL table engine, swapping them in with EXCHANGE. A materialized view enriches inserted events with joins and writes them to a SummingMergeTree table that serves queries. Reports that took two to three hours on MySQL now return almost instantly. ClickHouse was chosen over SingleStore on storage cost (SingleStore was 6x more expensive) and materialized view support, and the managed cloud offering won on operational burden and support.
- Lago - Using ClickHouse to Scale an Events Engine
ClickHouse mediumAdept
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. The ClickHouse side is small: a Kafka-engine queue table, a materialized view that maps event metadata from JSON into a string array, and a MergeTree raw_events table keyed on organization, subscription, code and timestamp. Aggregation queries got 18x to 137x faster; for example, a weighted sum dropped from 6.6s to 48ms. The post also covers OLTP vs OLAP tradeoffs, columnar storage, insert-time materialized views and vectorized execution.
- How Real Estate Analytics made its data pipeline 50x faster with ClickHouse
ClickHouse easyNovice
Real Estate Analytics replaced a MongoDB-based architecture with ClickHouse to serve user-selectable slicing across 200+ columns on 3-20 million row tables. In MongoDB each added index increased refresh time by about 10%, and full refreshes took 25-30 minutes. In ClickHouse the same refreshes finish in under 30 seconds (50x), and aggregation queries run about 10x faster. The team also replaced a Kafka-plus-containerized-consumer ingestion path with S3-to-ClickHouse loading, using globs, reading zip files without extracting them, the S3 table function and in-database JSON and regex parsing. Remaining gaps include no support for pre-1900 dates, weak WKT spatial support and, at the time, no auto-increment IDs.
- PostgreSQL + ClickHouse as the Open Source unified data stack
ClickHouse easyNovice
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. Two patterns are described: CDC replication for operational analytics on application data, and split-writes for high-volume logs, metrics and events that never need to live in Postgres. Adopting it involves creating a ClickHouse database, replicating via PeerDB, configuring pg_clickhouse and pointing queries at its tables, so application changes stay minimal. A managed version in ClickHouse Cloud swaps PeerDB for ClickPipes and preinstalls the extension.