Supabase at Scale: Lessons from 10M Rows
architecture
supabasepostgresscaling

Supabase at Scale: Lessons from 10M Rows

PostgreSQL at Production Scale

Scroll
Jan 15, 2026/architecture/1 min read

What happens when your Supabase project crosses the 10-million-row threshold.

Everything was fine at 1M rows. At 5M, some queries slowed. At 10M, three critical paths exceeded 500ms.

section

What We Learned

  • Index your RLS predicates: If your policy checks auth.uid() = user_id, index user_id
  • Use PgBouncer: Tune pool_size and server_idle_timeout
  • Partition early: Time-series data should be partitioned by month from day one
  • Materialized views: For complex aggregations, materialize and refresh on schedule
section

After Optimization

  • Average query: 520ms → 12ms
  • Connection overhead: 180ms → 3ms
  • RLS evaluation: 340ms → 0.8ms
TAGS:supabasepostgresscaling
Back to RadarJan 15, 2026 / VIBE WING