MySQL vs PostgreSQL
The oldest database rivalry in tech. One prioritizes simplicity. One prioritizes correctness. Choose accordingly.
PostgreSQL
PostgreSQL is the better database for almost everything built after 2015. Better JSON support, better extension ecosystem, better standards compliance. MySQL is fine if you inherited it, but you shouldn't start new projects on it.
The Classic Showdown
MySQL and Postgres have been fighting since the 90s. MySQL won the LAMP stack era. Postgres is winning the modern era. Here's why.
MySQL was built for speed and simplicity. Postgres was built for correctness and extensibility. For a long time, MySQL's speed advantage mattered. With modern hardware, it doesn't.
Why Postgres Wins Now
JSONB support that actually works. Full-text search without Elasticsearch. PostGIS for geospatial. pg_vector for AI embeddings. Extensions like TimescaleDB and Citus.
Postgres is a platform, not just a database. You can build entire applications on its feature set without bolting on 5 other services.
Where MySQL Still Makes Sense
WordPress runs on MySQL. That's 43% of the web. If you're in the WordPress ecosystem, MySQL is the obvious choice.
MySQL replication is simpler to set up. If you need read replicas and don't want to think too hard, MySQL makes it easy.
And honestly, for simple CRUD apps, MySQL is perfectly fine. Not everything needs JSONB and CTEs.
Quick Comparison
| Factor | MySQL | PostgreSQL |
|---|---|---|
| JSON Support | Basic | JSONB (excellent) |
| Extensions | Limited | Rich ecosystem |
| Replication | Simple, mature | More complex |
| Standards Compliance | Partial | Strict |
| Full-Text Search | Basic | Built-in, good |
| Hosting Options | Everywhere | Everywhere |
| WordPress Compat | Native | Not supported |
The Verdict
Use MySQL if: You're running WordPress, need dead-simple replication, or your team already knows MySQL inside and out.
Use PostgreSQL if: You're starting a new project, need advanced features like JSONB or PostGIS, or want a database that grows with you.
Consider: If you're choosing between managed services, look at Neon (Postgres) or PlanetScale (MySQL). The managed experience matters more than the engine for most teams.
PostgreSQL is the better database for almost everything built after 2015. Better JSON support, better extension ecosystem, better standards compliance. MySQL is fine if you inherited it, but you shouldn't start new projects on it.
Related Comparisons
Disagree? nice@nicepick.dev