PostgreSQL reached 55.6% developer adoption in the 2025 Stack Overflow Developer Survey—surpassing MySQL’s 40.5% and marking the first time in history that PostgreSQL has claimed the top database spot. Among professional developers specifically, the gap widens to 58.2% versus 39.6%, representing a 7 percentage point jump in just one year. MySQL stagnated at +0.2% growth while DB-Engines data from April 2026 shows PostgreSQL gained +17 points year-over-year as MySQL dropped -130 points. This isn’t incremental change—it’s a generational shift in database architecture, driven by AI demands MySQL can’t meet and performance advantages that compound with every release.
AI/ML Era Demands PostgreSQL—MySQL Has No Answer
The pgvector extension turned PostgreSQL into the default database for AI applications, enabling vector similarity search and embeddings storage directly in production databases. Meanwhile, MySQL has zero vector search capabilities and, according to industry analysis, “isn’t even in the conversation” for AI workloads in 2026. This gap matters because AI features became table stakes—RAG systems, recommendation engines, and semantic search are non-negotiable for modern applications.
pgvector provides HNSW and IVFFlat indexing for fast similarity search while supporting hybrid queries that combine vector search with standard SQL filters. Developers can find “in-stock products under $100 that are semantically similar to this query” in a single database call. MySQL forces teams to deploy separate vector databases like Pinecone or Weaviate, fragmenting the architecture and multiplying operational complexity. PostgreSQL consolidated the stack—one database handles relational data, JSON, and AI embeddings.
Performance Shift: PostgreSQL Dominates Writes, MySQL’s Edge Shrinks
PostgreSQL 17 and 18 reversed MySQL’s historical performance advantages. Performance benchmarks show PostgreSQL now delivers 4.9x faster write performance (21,338 INSERT operations per second versus MySQL’s 4,383), 3.5x lower write latency, and 3.7x faster JSON handling. MySQL retains only a narrow 20-30% edge in simple read queries—a shrinking advantage as PostgreSQL optimizations continue shipping.
This performance evolution aligns with modern application patterns. Event sourcing, microservices generating logs, real-time analytics, and AI embeddings ingestion all demand fast writes. PostgreSQL’s 4.9x write advantage compounds in production, while MySQL’s read strength only applies to basic SELECT queries without complex JOINs or aggregations. PostgreSQL 18’s async I/O improved P99 query latency by 30-50% on properly configured systems, addressing tail latency issues that plague user experience.
New Projects Choose PostgreSQL 3:1 Over MySQL
Approximately 65% of developers now prefer PostgreSQL for new projects, with greenfield applications choosing PostgreSQL over MySQL at a 3:1 ratio. The Stack Overflow survey shows PostgreSQL scored 65.5% “admired” and 46.5% “desired” compared to MySQL’s 54.9% and 28.3%—a gap that signals fundamental developer sentiment shifts. PostgreSQL held the #1 spot in both categories for three consecutive years.
The developer mindshare flip is complete. MySQL is now “the legacy LAMP stack database” and “what WordPress uses,” while PostgreSQL is “the modern cloud-native default.” Engineering leaders hiring backend developers find more PostgreSQL expertise in the market. New SaaS platforms, AI-powered applications, and cloud-native microservices start with PostgreSQL from day one. MySQL’s role narrowed to maintaining existing LAMP stack applications and powering WordPress sites—critical for installed base, irrelevant for future growth.
MySQL’s WordPress Lock-In Keeps It Alive
Despite the developer preference shift, MySQL retains massive installed base dominance through WordPress, which powers 43.5% of all websites and tightly couples with MySQL in the LAMP stack architecture. This creates a market paradox: MySQL’s DB-Engines score (858) still exceeds PostgreSQL’s (680), but the trend is unmistakable—PostgreSQL gaining +17 points yearly, MySQL losing -130.
WordPress’s market share stabilized in 2026, showing the first notable decline after years of growth (43.7% to 43.5%). This signals MySQL’s installed base has plateaued. The database market split into two tiers: PostgreSQL for the future (AI, cloud-native, microservices), MySQL for the past (WordPress, legacy LAMP stack). Hundreds of millions of WordPress sites won’t migrate—the cost is prohibitive—but they also won’t drive new MySQL adoption. Strategic guidance is clear: maintain MySQL for existing WordPress infrastructure, choose PostgreSQL for new projects.
Extension Ecosystem Gap Widens
PostgreSQL’s 300+ extensions enable developers to add specialized capabilities without deploying separate databases. The ecosystem includes pgvector for AI embeddings, TimescaleDB for time-series data (millions of inserts per second), and PostGIS for geospatial queries (300+ spatial functions used by Uber, Lyft, and Mapbox). These extensions run simultaneously in the same database—pgvector + TimescaleDB + PostGIS together.
MySQL’s limited extension ecosystem forces developers to deploy multiple specialized databases: Pinecone for vector search, InfluxDB for time-series, and custom geospatial solutions. This fragments the data architecture, multiplies operational overhead, and increases total cost of ownership. PostgreSQL’s “one database, multiple capabilities” approach consolidates the stack. A project starting with basic CRUD can later add vector search (AI features), time-series analytics (monitoring), or geospatial queries (location features) without database migration. MySQL lacks this extensibility path.
What This Means for Developers
The market shift from MySQL to PostgreSQL reflects fundamental changes in application architecture. The LAMP stack era (Linux, Apache, MySQL, PHP) dominated the 2000s web, optimized for read-heavy content sites. The cloud-native AI era demands write performance, JSON flexibility, vector search, and extensibility—capabilities MySQL never prioritized.
Strategic decision framework: Choose PostgreSQL for AI/ML applications, JSON-heavy APIs, write-intensive workloads, and cloud-native deployments. Choose MySQL only for WordPress sites, legacy LAMP stack maintenance, or teams with deep MySQL expertise where migration cost exceeds benefits. The default flipped—PostgreSQL is now the safe choice unless specific constraints force MySQL.
DB-Engines trends suggest PostgreSQL will overtake MySQL in absolute ranking within 2-3 years at current trajectories (+17 versus -130 annually). Developer preference already shifted decisively (55.6% vs 40.5%), and new project adoption reinforces the gap (3:1 ratio). MySQL’s future ties to WordPress’s trajectory—if WordPress adds PostgreSQL support, MySQL loses its primary use case. Until then, MySQL maintains a massive but stagnant installed base while PostgreSQL captures the future.
Key Takeaways
- PostgreSQL dethrones MySQL: 55.6% vs 40.5% in Stack Overflow 2025, first time PostgreSQL leads in survey history
- AI/ML drives shift: pgvector makes PostgreSQL the default for AI applications; MySQL has no vector search capabilities
- Performance evolution: PostgreSQL 4.9x faster writes, 3.7x faster JSON; MySQL’s read advantage shrinks to 20-30% for simple queries
- New projects prefer PostgreSQL 3:1: 65% of developers choose PostgreSQL for greenfield development
- MySQL’s WordPress lock-in: 43.5% of web keeps MySQL installed base massive, but growth stagnant
- Extension ecosystem gap: PostgreSQL 300+ extensions (pgvector, TimescaleDB, PostGIS) vs MySQL’s limited options
- Strategic default flipped: PostgreSQL for new projects unless WordPress or legacy constraints











