Firestore billed us $340/mo to store 12K documents we could serve from a $7 Cloud SQL instance.
The Math That Changed Everything
Firestore is elegant. It handles auth, real-time sync, and security rules out of the box. For a prototype, it's unbeatable. But we're not prototyping anymore.
Here's what our Firestore bill looked like in January 2026: 12,431 documents across 47 collections, ~2.1M reads/month (mostly from marketing dashboards refreshing), and a monthly cost of $340.
Meanwhile, Cloud SQL (PostgreSQL) with the equivalent data: same 12K rows in properly indexed tables, unlimited reads (it's just SQL queries), and a monthly cost of $7 on a db-f1-micro instance.
That's a 48x cost difference. For a startup running lean, that's the difference between runway and ruin.
The Migration Playbook
Phase 1: Identify the Cold Data. Any collection that's read-heavy and write-rare is a candidate. Marketing data, analytics rollups, historical campaigns — all moved.
Phase 2: Cloud Run Jobs. We wrote Cloud Run jobs that read from Firestore collections, transform to relational schema, bulk insert into Cloud SQL, and verify row counts match.
Phase 3: Swap the API Layer. Our API routes went from db.collection('x').get() to pool.query('SELECT * FROM x'). Same response shape, different backend.
Phase 4: Delete the Firestore Collections. Once the API layer was swapped and verified in production for 48 hours, we deleted the old collections. No going back.
Firebase vs Cloud SQL — The Numbers
| Metric | Firestore | Cloud SQL |
|---|---|---|
| Monthly Cost | $340 | $7 |
| Query Performance | 50ms avg | 8ms avg |
| Developer Experience | SDK-specific | SQL (universal) |
| Aggregations | Limited | Full SQL window functions |
| JOINs | Not supported | Native |
The Lesson
Don't fall in love with your tools. Fall in love with the problem. Firebase was the right tool for month 1. Cloud SQL is the right tool for year 2.
The result: $333/mo saved ($4,000/year), query performance from 50ms to 8ms average, and every engineer knows SQL.
