Skip to content

Menu

PostgreSQL
VS
MySQL

PostgreSQL vs MySQL

Short answer

Both are mature, production-grade choices, and for most CRUD applications either will do the job. PostgreSQL is the safer pick if licensing freedom, JSON indexing or community governance matter to you. MySQL makes sense when your team already knows it, when you want long LTS support windows, or when you need an Oracle commercial licence. Benchmark with your own workload before treating either as faster.

PostgreSQL and MySQL are the two open source relational databases most web stacks start with. Both speak SQL, both are free to run, and both are widely offered as managed services. The differences are in licensing, who controls the project, how releases work and some finer features such as JSON indexing.

PostgreSQL is a community project released under the PostgreSQL License, a permissive licence similar to BSD and MIT. It ships one major version a year and supports each for five years, with minor bug and security releases at least every three months. As of November 2026 the current major is 18 (18.6), PostgreSQL 19 is at release candidate 1, and version 14 reaches end of life on 12 November 2026. Major upgrades need pg_upgrade or a dump and reload.

MySQL is owned by Oracle and offered under GPLv2, with a commercial licence sold to companies that embed it in their own products and want to avoid GPL obligations. It runs two tracks. LTS releases receive only fixes and follow Oracle Lifetime Support, five years of premier support plus three of extended support. Innovation releases add and remove features and are supported until the next Innovation release. The 8.4 series is LTS, and the newest release in the docs is 9.7.4 from 20 October 2026. Its default storage engine, InnoDB, provides ACID transactions, row-level locking, MVCC and foreign keys.

JSON is a useful example of how they differ. PostgreSQL's jsonb column can be indexed directly with GIN. MySQL stores JSON in a binary format too, but you cannot index the column directly; you index a generated column that extracts a value, or use multi-valued indexes on arrays.

How they compare

AspectPostgreSQLMySQL
LicencePostgreSQL License (permissive).GPLv2, plus a commercial licence from Oracle.
OwnershipIndependent community project.Oracle.
Current release18.6; 19 at release candidate 1.9.7.4 (20 October 2026); 8.4 is an LTS line.
Release modelOne major a year, each supported for five years.LTS (5 years premier plus 3 extended) and Innovation tracks.
Upgradespg_upgrade or dump and reload between majors.In place within an LTS series; Innovation majors go through the nearest LTS.
JSONjsonb with direct GIN indexing.Binary JSON; index generated columns or use multi-valued indexes.

Choose PostgreSQL if…

  • You want a permissive licence with no commercial edition
  • You query and index JSON heavily
  • You want a predictable yearly release cycle
  • You prefer a database no single company owns

Choose MySQL if…

  • Your team or framework already runs MySQL
  • You want LTS releases with up to eight years of support
  • You may need a commercial licence for embedding
  • You do lots of primary-key lookups and like InnoDB's clustered layout

Researched November 2026 from each product's official documentation and pricing pages. Prices and features change often, so check the vendors' sites before you decide.

Sources

More comparisons

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…