Why MySQL Still Beats PostgreSQL in China: A Deep Dive
An in‑depth analysis shows that MySQL’s early Windows support, lower entry barrier, strong LAMP ecosystem, backing from major Chinese tech firms, and a mature tooling landscape together explain why it remains far more popular than PostgreSQL across China despite global growth trends.
Global and Chinese Popularity Trends
DB‑Engines rankings show MySQL still ahead of PostgreSQL worldwide, and Google Trends for the past year confirm MySQL’s clear lead in most regions, especially China where the share gap reaches 96% to 4%.
Author Background
The author has been studying databases since 2009, working with MySQL 5.1 and PostgreSQL 8.x, and later maintaining both MySQL and PostgreSQL branches on Google Cloud SQL from 2013 onward, giving a long‑term perspective on their evolution.
Key Reasons for MySQL’s Dominance in China
1. Early Windows Support
MySQL released a Windows version in 1998, while PostgreSQL only offered an official Windows build in 2005, making MySQL the default choice for developers on Windows machines.
2. Lower Entry Barrier
Connection simplicity: PostgreSQL requires specifying a database name on connection, whereas MySQL can connect without it, avoiding the “FATAL Database does not exist” error.
Access‑control configuration: PostgreSQL needs an additional pg_hba.conf file besides its user system, adding extra setup steps.
Hierarchy differences: MySQL’s hierarchy is instance → database → table; PostgreSQL adds a schema layer ( instance/cluster → database → schema → table), which most users never need, creating unnecessary complexity.
Cross‑database queries: PostgreSQL historically required extensions like dblink or FDW for cross‑database queries, whereas MySQL handles them more directly.
Permission model: PostgreSQL’s fine‑grained ownership model leads to frequent permission‑related issues during testing.
3. Performance History
Early Google search and advertising services ran on MySQL; internal tests showed MySQL outperforming PostgreSQL, influencing the final selection. Today, performance differences depend heavily on query complexity, concurrency, and latency, and in many scenarios the two are comparable.
4. Internet Stack (LAMP)
The LAMP stack (Linux, Apache, MySQL, PHP) emerged in 1998 alongside the rise of the web, cementing MySQL’s role as the database component of the dominant web development platform.
5. Influence of Large Tech Companies
Google’s MySQL team (e.g., Mark Callaghan) contributed heavily to the ecosystem, later moving to Facebook and driving tools like MHA (Master High Availability). Their work propagated through Google → Facebook/Twitter → Chinese internet giants, reinforcing MySQL’s market position.
6. Ecosystem and Tooling
MySQL benefits from a rich ecosystem: InnoDB for transactions, mature replication, sharding middleware, and a plethora of books and training resources (e.g., *High Performance MySQL*). Companies such as Percona provide specialized tools like pt-online-schema-change and xtrabackup. In China, Alibaba contributed replication improvements, and firms like Qihoo, Xiaomi, and PingCAP built parsers and audit tools.
PostgreSQL’s tooling lags behind; for example, it lacks an out‑of‑the‑box parser for SQL audit, forcing projects like Bytebase to implement their own solutions.
Conclusion and Outlook
The core driver of MySQL’s dominance in China is its early Windows availability, which made it the default database for the LAMP stack and thus the backbone of the Chinese internet. Combined with strong corporate adoption, a massive ecosystem, and entrenched tooling, MySQL secured a network effect that PostgreSQL has yet to overcome.
With MySQL 5.7 reaching end‑of‑life and PostgreSQL gaining traction, the next fifteen years—especially in the AI and VR era—may see a shift in the balance, but the historical forces that shaped the current landscape will continue to influence future developments.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
