PostgreSQL or MySQL – and what about MariaDB?

All three are free, mature and good enough for most small-business systems. The choice is rarely decided by speed. It is decided by the system you build on, what your supplier can operate, and whether the data already lives somewhere.

Last checked:

On this pageWhat this page covers
  1. The short answer
  2. PostgreSQL, MySQL and MariaDB side by side
  3. When PostgreSQL wins
  4. When MySQL or MariaDB is right
  5. MySQL and MariaDB are no longer the same
  6. Test on the same engine as production

The short answer

The system often decides for you. WordPress and WooCommerce run on MySQL or MariaDB. Odoo runs only on PostgreSQL – our own Odoo 19 runs on PostgreSQL 16. If you are building something new, PostgreSQL is our default. If large amounts of data already live in MySQL and it works, leave them there.

That is also what our own fleet looks like: MySQL 8 and MariaDB almost everywhere, because they are the control panel’s default, and PostgreSQL for new projects. Our 130 million rows of vehicle data live in MySQL and will stay there.

PostgreSQL, MySQL and MariaDB side by side

PropertyPostgreSQLMySQLMariaDB
Licence and ownerPostgreSQL licence, communityGPL, owned by OracleGPL, MariaDB Foundation
Current long-term versions18 (19 released 19.11.2026)8.4 LTS and 9.7 LTS10.11, 11.4, 11.8, 12.3 LTS
Support per major version5 years8.4: until 30.04.203210.11: until 16.02.2028
JSONjsonb with indexesJSON typeJSON as text with functions
ExtensionsPostGIS, pgvector, pg_trgm and morefewfew
WordPress / WooCommercenoyesyes
Odooyes, only thisnono
Common in control panelsrarelyyesyes
Strictnessstrict types, fails loudlyforgiving, depends on SQL modelike MySQL
Our assessment for small-business systems, November 2026. Support dates from the projects’ own pages; MySQL dates from endoflife.date.

When PostgreSQL wins

Complex data and queries. PostgreSQL has strong types, jsonb with indexes and extensions that would otherwise need a separate database. We use it in jajob with pgvector for vectors and tsvector for text search – a hybrid of BM25, vector search and reranking in one database.

Many customers in one system. JaKun, our own product, runs PostgreSQL 17 with one schema per customer. In our first load test the slowest p95 was 25.9 ms at 200,000 records and 107 fields. A schema per customer is easy to isolate and easy to back up per customer.

Predictable behaviour. PostgreSQL rejects data that does not fit instead of silently fixing it. MySQL DATETIME, for example, rounds fractional seconds, which gave us differences between test and production.

Long, clear support. Every major version gets fixes for five years. PostgreSQL 14 had its final release in November 2026, PostgreSQL 16 is covered until November 2028 and 18 until November 2030.

When MySQL or MariaDB is right

WordPress, WooCommerce and most PHP systems. They require MySQL or MariaDB. The choice is made.

When the data already lives there. A migration costs time and risk. danadresse.dk, our own product, runs on MySQL 8 with Redis and Meilisearch, and moving it on principle would make no sense.

When your supplier can only operate MySQL. A well-kept MySQL beats a neglected PostgreSQL.

MySQL and MariaDB are no longer the same

MariaDB began as a fork of MySQL, but the two have drifted apart, and you notice it in the details. The MySQL hint /*+ MAX_EXECUTION_TIME */ does nothing on MariaDB; there you use SET STATEMENT max_statement_time=N FOR …. We found out when a browse query over 12.6 million vehicles took 16–20 seconds or hung. JSON also behaves differently. Always test on the engine you run in production; our performance tests for bkg.dk run on MySQL 9.7. MariaDB 10.11 has community support until 16.02.2028, and the newer LTS lines 11.4 and 11.8 reach 2028–2029.

Test on the same engine as production

The biggest mistake we have seen is not about choosing a database but testing on a different one. In one project 320 tests passed on SQLite while four tables were dead in production on MySQL. Today our test databases run in Docker on our own hub, so tests hit the same engine and version as production.

Our pick

PostgreSQL for new work – leave what works where it is

New apps and internal systems: PostgreSQL 18 or 17. WordPress and WooCommerce: MariaDB 10.11 or 11.x, or MySQL 8.4 LTS. Existing MySQL data that works: stay, and spend the effort on backups and indexes instead.

In favour

  • PostgreSQL: extensions, strict types, five years of support per version
  • MySQL/MariaDB: everywhere at hosts and panels, required by WordPress

Watch out for

  • Do not switch engines mid-project without a reason you can measure
  • MariaDB and MySQL are not interchangeable – test on the one you run

Sources

Last reviewed: 2026-12-03

Questions about PostgreSQL and MySQL

Is PostgreSQL faster than MySQL?

It depends on the query. For simple primary-key lookups they are equal. For complex queries, JSON and text search PostgreSQL has more tools. Indexes matter more than the engine.

Which MySQL version should we use in 2026?

MySQL 8.0 reached end of life in April 2026. Use 8.4 LTS, supported until 2032, or 9.7 LTS.

Can WordPress run on PostgreSQL?

Not without plugins that translate SQL, and we do not recommend that in production. Use MariaDB or MySQL.

Should we switch from MariaDB to MySQL or the other way round?

Only with a concrete reason. They are no longer fully compatible, so a switch is a migration with testing, not an update.

Fixed price, no commitment

Get a fixed price for your database task

Tell us briefly what you use today and what you want to achieve. A person answers by e-mail with a proposal and a fixed price before any work starts.

  • A fixed price before we start
  • An answer by e-mail, no calls
  • Your details are used only to answer you

Fields marked with * are required.

What is it about?