Prompt
What should I use for a multi-tenant SaaS database, Postgres or DynamoDB?
Latest observation
Oct 23, 2026
OpenAI APIWeb search: off
For most multi-tenant SaaS products, Postgres is the better default choice.
Use Postgres if you want:
- Flexible querying: joins, filters, reporting, analytics, ad hoc queries
- Strong consistency and transactions: important for billing, permissions, workflows
- Easier multi-tenant patterns: shared schema with
tenant_id, separate schemas, or separate DBs - Mature tooling: migrations, backups, observability, ORMs, SQL debugging
Use DynamoDB if you want:
- Very high scale with predictable access patterns
- Simple key-value / document access
- Low-latency reads/writes at massive throughput
- You can design access patterns up front and avoid joins/reporting needs
Typical SaaS reality
Most SaaS apps need:
- user/org management
- permissions
- subscriptions/billing
- audit logs
- reporting/search/filtering
- occasional complex queries
That usually maps much better to Postgres.
Common multi-tenant Postgres models
-
Shared DB, shared tables, tenant_id column
- Cheapest and simplest to start
- Good for many startups
- Add row-level security if needed
-
Separate schema per tenant
- More isolation
- More operational complexity
-
Separate database per tenant
- Best isolation
- Hardest to operate at scale
When DynamoDB makes sense
Choose DynamoDB if your app is more like:
- event ingestion
- IoT
- session/store data
- massive scale with known lookup patterns
- you’re okay denormalizing heavily
Practical recommendation
- Start with Postgres
- Design your schema around
tenant_id - Use indexes like
(tenant_id, created_at)and(tenant_id, status) - Consider partitioning or separate databases later if tenant count or isolation demands it
If you want, I can also give you:
- a decision matrix, or
- a recommended Postgres schema pattern for multi-tenancy.