MySQL vs PostgreSQL
Two run it yourself options for database. When each fits, what it costs, who moves from one to the other, and what makers who chose it say.
Which fits you
- PHP, Laravel, WordPress and Rails stacks, and teams that already know MySQL well.
Use it whenYour framework, host or existing data already assumes MySQL, or you're joining a codebase built on it.
Trade-offFewer extensions and advanced types than Postgres, so most new tooling (vectors, JSON-heavy work) targets Postgres first.
- You already run your own server and want a flat monthly cost
Use it whenYou already run a server, or want extensions and settings a managed provider doesn't offer.
Trade-offBackups, upgrades, failover and connection pooling are yours to set up and watch.
At a glance
| Used by | 6 makers' products · 178 open-source projects | 74 makers' products · 542 open-source projects |
|---|---|---|
| Downloads | 14.3M/wk+17% vs npm | 45.1M/wk+18% vs npm |
| Pricing | Free (open source Community Edition); managed versions are sold by cloud providers. | Free and open source under the PostgreSQL License; you pay only for the server or managed service that runs it. |
| Free tier | Yes | Yes |
| Open source | Yes · self-hostable | Yes · self-hostable |
What makers say
Makers on using it for database, from Product Hunt and Starter Story interviews, each linked to the source. Products with a page of their own and fuller notes first.
We needed a structured and reliable database to handle team interactions and activity tracking effortlessly. It’s the pizza vault where every slice sent, received, and celebrated is safely stored! 🍕📦
This relational database is known for its reliability and extensive adoption. It benefits from a large community and ample resources for support and learning. By adhering to SQL standards, it eases development and migration processes. Additionally, it provides flexible scalability options, both horizontal and vertica…
We chose MySQL for its reliability, speed, and flexibility, ensuring efficient data management and scalability for our project.
Postgres is rock-solid. It handles complex data relationships gracefully and gives us the querying power we need as we scale. For relational data, it’s hands down the best choice for us.
We picked PostgreSQL over MongoDB and dedicated vector databases because one proven database handles our relational data, JSON and agent memory, with no extra stores to run.
Postgres is so nice to work with. pg_dump was a lifesaver when we had to move database providers. Extensions like pgvector make it the best database for building AI apps.
Loved and watch-outs
Themes that recur in makers' words and Hacker News comments, each linked to what it summarises.
- It is rock-solid, keeps data consistent with strong transactions, and handles complex relational queries well. PHPH 2PH 3PH 4
- With pgvector, embeddings live next to relational data, so AI features need no separate vector database. PHPH 2PH 3PH 4
- Extensions and features like PostGIS, JSON support and advanced indexing cover geospatial and semi-structured data too. PHPH 2PH 3
- Built-in full-text search lacks corpus-wide relevance ranking like BM25 and can need very large indexes. HNHN 2
- It has no loose index scan, so SELECT DISTINCT over large tables needs manual workarounds. HNHN 2
- Timestamp versus timestamptz and AT TIME ZONE behavior are easy to get wrong, with edge-case bugs around daylight saving. HNHN 2HN 3

