Multi-tenant analytics: 240ms p99 across 600 customer workspaces

Growth-stage B2B analytics SaaS

Dashboards from 11s to 380ms across 600 tenants. Series A closed at 3× valuation.

11s → 240ms

p99 dashboard latency

600

Workspaces migrated

2.4B

Events backfilled

The situation

  • A Berlin-based product analytics SaaS hit 600 paying workspaces faster than expected. The Lovable-generated schema put every customer's events into a single shared table with a `workspace_id` column.
  • Queries against the largest 20 workspaces were locking the database, and dashboards were timing out for the customers paying the most. A Series A term sheet was on the table.
  • The lead investor's tech diligence partner was scheduled to spend 4 hours with the codebase. The CTO needed a real multi-tenant data architecture, not a slide deck about one.

What we did

  • Postgres + ClickHouse architecture with per-workspace partitioning
  • Query planner routing between transactional and analytical stores
  • Per-dashboard Redis cache with event-driven invalidation
  • Materialize-powered live dashboard with sub-second freshness
  • Natural-language query feature scoped per workspace
  • Per-workspace latency dashboards on Grafana for SLA reporting

The result

  • Series A closed two weeks after the diligence call at a 3.4× higher valuation than the previous round.
  • Largest workspace dashboards now load in under 300ms. The natural-language query feature converted into a paid add-on within 60 days and is now used by 22% of accounts.

Timeline

How it unfolded

  1. Days 1-2

    Scaling audit + ClickHouse design

  2. Days 2-6

    Dual-write + backfill

  3. Days 6-9

    Query planner

  4. Days 9-12

    Materialized live dashboards

  5. Days 12-14

    AI natural-language query

  6. Days 14-16

    Cutover + observability

  7. Day 17

    Diligence + Series A close

The diligence partner literally asked our CTO who had built the data layer. That conversation is what closed the round.

CEO · Product Analytics SaaS · Berlin, Germany

Stack

ClickHouse CloudSupabaseMaterializeRedis (Upstash)OpenAIGrafana Cloud

Want to be the next case study?

Book a call →