PostgreSQL vs MySQL: Stop Asking, Start Benchmarking

·1 min read·

Both are excellent. Neither is universally better. A practical comparison from someone who has shipped on both.

The PostgreSQL vs MySQL debate generates a lot of heat and very little light.

PostgreSQL wins on: complex queries with CTEs and window functions, JSON/JSONB storage, strict SQL compliance, and write-heavy workloads with complex constraints.

MySQL wins on: read-heavy workloads with simple queries, replication simplicity, and situations where the hosting environment constrains choice.

My typical choice: PostgreSQL for financial systems requiring strict consistency and complex reporting. MySQL for content platforms and e-commerce.

Run your actual queries on both. Benchmark with production-representative data volumes. Let the numbers decide.

— Dick Bassey | DevDick | 2020

Share this article
← Back to all writing