The challenge
Analytical systems are optimised for batch reads; transactional systems for point writes. Real-time analytics requires both simultaneously — high-throughput writes and low-latency analytical reads.
Approach 1 — Streaming to OLAP
Kafka → Flink/Spark Streaming → ClickHouse or Apache Druid. Sub-second ingestion latency with analytical query response in milliseconds on billions of rows. Standard for user-facing dashboards and operational analytics.
Approach 2 — HTAP (Hybrid Transaction/Analytical Processing)
A single database that handles both. TiDB, SingleStore, and YugabyteDB support HTAP. Eliminates the pipeline entirely. Best when data volume is modest and operational simplicity is the priority.
Approach 3 — Read replicas + columnar extension
PostgreSQL with a columnar storage extension (pg_analytics or Hydra) on a read replica. Analytical queries route to the replica; transactions go to the primary. No separate system.
ClickHouse for high-volume
Ingests millions of rows/second, queries billions of rows in milliseconds. Purpose-built for this use case. Lingua franca for real-time analytics at scale.