Why MySQL Outpaces PostgreSQL in Modern Web Applications
The article compares PostgreSQL and MySQL, highlighting PostgreSQL’s strengths in analytics and Oracle compatibility but criticizing its OLTP performance, while emphasizing MySQL’s superior scalability, feature set, and growing ecosystem, and discusses the broader trend of moving away from Oracle‑centric architectures.
PostgreSQL
PostgreSQL advertises itself as “the world’s most advanced open‑source database”. Its core engine uses traditional B‑tree indexes, which can be slower than specialized engines (e.g., TokuDB, MongoDB) for pure insert‑heavy workloads. The optimizer is strong for complex joins and analytical queries, making PostgreSQL a good target for Oracle‑to‑PostgreSQL migrations and for projects that extend the Greenplum analytical platform. However, the database shows noticeable OLTP performance gaps: benchmark reports indicate that MySQL 5.7 can sustain around 500 k queries per second (QPS) on SSDs, while PostgreSQL typically lags behind in the same scenario.
MySQL
MySQL’s official slogan is “the world’s most popular open‑source database”. Since MySQL 5.6 the server includes several join‑optimisation features that narrow the gap with PostgreSQL’s optimizer:
Multi‑Range Read (MRR) – reduces random I/O for range scans.
Index Condition Push‑down (ICP) – filters rows earlier in the execution plan.
Batched Key Access (BKA) Join – improves join performance for many‑to‑many relationships.
MySQL 5.7 can reach roughly 500 k QPS on modern SSD hardware, and the NoSQL interface (e.g., MySQL Document Store) can push throughput toward 1 M QPS. The default InnoDB engine provides ACID compliance and crash‑recovery, while optional engines such as TokuDB (LSM‑tree‑like) and Infobright (columnar) address specific workloads like high‑concurrency inserts or analytical reporting. Although MySQL still lacks native hash joins, the above optimisations deliver comparable performance for most multi‑table joins.
For scenarios that require Oracle‑style transparent gateways, the MariaDB Connect storage engine can emulate cross‑database queries, offering a practical alternative to Oracle’s Transparent Gateway feature.
IOE Migration (IBM‑Oracle‑EMC)
The “IOE” replacement movement, pioneered by Alibaba’s Taobao, aims to replace legacy IBM mainframes, Oracle databases, and EMC storage with commodity x86 hardware and open‑source software. The hardware swap is relatively straightforward, but replacing Oracle with MySQL typically required 3–4 years of effort, extensive retraining of DBAs, and redesign of application architectures. The migration highlighted two major constraints:
Talent scarcity – many enterprises lack engineers experienced with large‑scale MySQL or PostgreSQL deployments.
Operational maturity – MySQL’s ecosystem offers extensive high‑availability patterns, backup strategies, and community resources, whereas PostgreSQL’s large‑scale production experience in certain regions (e.g., China) remains limited.
Conclusion
For internet‑scale services that demand high OLTP throughput, mature high‑availability tooling, and a broad ecosystem of extensions, MySQL (especially versions 5.6/5.7 and later) is the more pragmatic choice. PostgreSQL excels in analytical workloads, complex join optimisation, and Oracle migration paths, but its OLTP performance and ecosystem maturity lag behind MySQL in many large‑scale deployments.
dbaplus Community
Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
