Postgres or MySQL by Workload: A Decision Matrix for 2026

Not all workloads are equal. Here is the honest answer by workload type, with named real-world precedents.

New SaaS / web app

Postgres

Ecosystem velocity (Heroku, Render, Supabase, Neon, Railway all default Postgres), feature richness (JSONB, CTEs, PostGIS), governance (no Oracle). The Stack Overflow Developer Survey has Postgres as most admired DB since 2022.

Precedent: Notion, Heap, GitHub backend services, Discord relational services

Read-heavy CRUD

Either; lean Postgres

Both handle CRUD well. Postgres has a planner advantage on complex queries. MySQL InnoDB's clustered index gives a slight edge on simple primary-key lookups at high concurrency. Unless you have a MySQL-specific reason, default Postgres.

Precedent: Both choices are well-represented in production

Analytics / OLAP

Postgres + Citus / DuckDB (or HeatWave if on OCI)

Open ecosystem: Postgres + Citus (distributed HTAP), Postgres + TimescaleDB (time-aggregations), or DuckDB as an analytics sidecar. MySQL HeatWave is genuinely fast but locks to OCI / AWS. For open-stack analytics, Postgres wins clearly.

Precedent: Heap on Citus; HeatWave benchmarks from Oracle (vendor-sourced)

Geospatial / GIS

Postgres + PostGIS

PostGIS is the industry standard. Every major open-source GIS tool (QGIS, GeoServer, OpenStreetMap, Mapbox tile-gen) works natively with PostGIS. MySQL spatial is adequate for simple point-in-polygon; PostGIS handles complex geometry, raster, topology, and coordinate projections.

Precedent: OpenStreetMap, Mapbox (PostGIS backend), most national mapping agencies

Time-series

Postgres + TimescaleDB

TimescaleDB (open-source core) builds on Postgres to handle trillions of rows, continuous aggregates, compression, and time-based partitioning automatically. MySQL alternatives for time-series are significantly less mature.

Precedent: TimescaleDB used by Cisco, SAP, Comcast (per TimescaleDB case studies)

Sharded / massive-scale OLTP

MySQL via Vitess

Vitess (MySQL) has a more battle-tested production track record for sharded OLTP than Citus (Postgres). YouTube created Vitess for its MySQL fleet. Slack, GitHub, and Booking.com all run Vitess at massive scale. Citus is younger but well-supported by Microsoft.

Precedent: YouTube (Vitess origin), Slack, GitHub, Booking.com
See when MySQL wins

WordPress / Drupal / Magento (LAMP)

MySQL / MariaDB

The LAMP ecosystem is MySQL-native. WordPress on Postgres is documented pain: the WP community has tried it (WP-Postgres plugin) but MySQL is the first-class path. Magento is MySQL-only. Drupal technically supports Postgres but MySQL is the common deployment.

Precedent: WordPress powers 40%+ of the web, almost all on MySQL or MariaDB
See when MySQL wins

OLTP with complex joins, CTEs, windowing

Postgres

Postgres's query planner is stronger for complex multi-table joins, CTE materialisation control (MATERIALIZED hint), and analytical-style queries on an OLTP dataset. For workloads that blend CRUD with reporting, Postgres wins.

Precedent: GitHub, Notion, Discord all run complex reporting queries on Postgres

Startup MVP / new project

Postgres

Default Postgres. Supabase, Neon, Railway, and Render make Postgres setup frictionless. You can add PostGIS, TimescaleDB, or Citus later without changing databases. You cannot add these to MySQL.

Precedent: The default of every major hosting provider for new projects in 2026

Framework-fit table

FrameworkLeans towardNotes
DjangoPostgresDjango docs explicitly recommend Postgres. django.contrib.postgres provides JSONB fields, ArrayField, HStoreField, full-text search support. MySQL is a supported backend but docs lean Postgres.
RailsEither; Postgres slightly more idiomaticActiveRecord supports both well. Newer Rails features (jsonb, partitioning helpers) are Postgres-first.
LaravelMySQLLaravel's ORM (Eloquent), migration system, and docs are historically MySQL-tilted. The ecosystem assumption is MySQL.
Spring Boot (JPA)EitherJPA abstraction means both work equally well. Choose based on team familiarity and DBA depth.
Node.js + PrismaEither (Postgres marginally better tooling)Prisma supports both. Postgres tooling is marginally richer (Neon, Supabase integration, JSONB native type).
FastAPI + SQLAlchemyPostgresPython ecosystem tilts Postgres. psycopg2/psycopg3 are the canonical adapters. SQLAlchemy's Postgres dialect is the most feature-complete.

DB choice is part of a larger stack decision. See related: Rust vs Go · Monorepo vs Polyrepo · Tech Stack Cost