MySQL vs PostgreSQL for a new web application?

asked 4 months ago362 viewsen

3

Starting a new SaaS. The team knows MySQL a little. Is there a strong reason to choose PostgreSQL instead?

AI diagnosis

AI-generated. Not an answer — the community below confirms or corrects it. Always verify before relying on it.

asked 4 months ago

1 Answer

8
✓
✓ Accepted answer

Both are excellent and will handle far more load than most SaaS products ever see. PostgreSQL has become the common default because of:

- Richer features: JSONB with indexing, arrays, CTEs and window functions (MySQL 8 has these too now), partial and expression indexes, RETURNING, transactional DDL (a failed migration rolls back cleanly). - Extensions: PostGIS (maps), pg_trgm (fuzzy search), pgvector (AI embeddings), TimescaleDB. - Ecosystem: Supabase, Neon and most managed platforms are Postgres-first.

Choose MySQL if you're on a stack that assumes it (WordPress, some PHP hosting), your team's operational expertise is there, or you need Vitess/PlanetScale-style sharding.

The SQL knowledge transfers. The main new things to learn are Postgres roles, VACUUM, and some syntax differences.

Sign in to tell others whether this worked.

answered 4 months ago

Sign in and verify your email to post an answer.