Alle Artikel
Bases de donnéesPostgreSQL

PostgreSQL oder MySQL: welche Datenbank für Ihren VPS?

Veröffentlicht am 5. August 2025 · 9 Min. Lesezeit

Dieser Artikel ist auf Französisch und Englisch verfügbar.

The flamewar is over: both are excellent

PostgreSQL and MySQL together run most of the web, and both install in five minutes on a VPS. The real question isn't "which is best" but "which fits your application". Here's our grid, fed by thousands of VPS observed in production.

PostgreSQL shines when

  • Data is complex: indexed JSONB, arrays, geographic types via PostGIS, native full-text search. What takes three tables and a join in MySQL often fits in one PostgreSQL column.
  • Queries are sophisticated: PostgreSQL's planner handles deep joins, CTEs, and parallelism better.
  • Integrity matters: DDL transactions, advanced constraints, rigorous MVCC — the foundation of applications where a lost write costs money.

MySQL shines when

  • The ecosystem decides: WordPress, Magento, PrestaShop and thousands of applications are optimized for MySQL/MariaDB. Picking PostgreSQL for a WordPress site is swimming against the current.
  • The load is simple and massive: primary-key reads at very high throughput — InnoDB's historic territory.
  • The team already knows it: a well-administered MySQL beats an endured PostgreSQL, and vice versa.

Numbers from our test bench

Same Quantum VPS (16 vCore, 64 GB), equivalent tuning, NVMe Gen4:

TestPostgreSQL 16MySQL 8.4
Simple read (point select)310,000 qps365,000 qps
Read/write mix (oltp)24,500 tps21,800 tps
Analytical query (aggregates, 50M rows)4.2 s11.8 s

Reading: MySQL ahead in pure reads, PostgreSQL ahead as soon as writes and complexity enter the picture. Both smash their own numbers from ten years ago.

Tuning matters more than the choice

A bad setting costs more than the wrong engine. The two lines that change everything, on a 16 GB VPS:

# PostgreSQL: shared_buffers ≈ 25% of RAM
shared_buffers = 4GB
effective_cache_size = 12GB

# MySQL: InnoDB buffer pool ≈ 60-70% of RAM
innodb_buffer_pool_size = 10G

And above all: the database must fit in RAM, or storage must keep up. On NVMe Gen4 at 1M IOPS, even out-of-cache reads stay under a millisecond — that's where infrastructure separates two VPS that are "identical on paper".

Our decision rule

New application, evolving schema, rich data → PostgreSQL. Existing application built for MySQL, team fluent in MySQL → stay on MySQL. And when in doubt, PostgreSQL: no customer has ever reported regretting it.