Databases and storage · Comparison
PostgreSQL vs MySQL
The two most popular open-source relational databases. Either will run a typical web app well; the differences show up at the edges.
2 options · 7 questions side by side · updated
| Compare | PostgreSQL | MySQL |
|---|---|---|
| Features | Very rich: JSONB, arrays, extensions | Solid core, fewer advanced features |
| Strictness | Strict about data by default | Stricter now, looser historically |
| Extensions | PostGIS, pgvector, pg_cron and more | Few; features arrive with new versions |
| Row-level permissions | Row level security built in | Not built in |
| Hosting | Every cloud, Supabase, Neon | Every cloud, shared hosts, PlanetScale |
| Home turf | Modern JavaScript and Python stacks | WordPress, PHP and Laravel |
| Licence | PostgreSQL licence (permissive) | GPL, owned by Oracle |
How to choose between PostgreSQL and MySQL
- Pick PostgreSQL for new projects that may need JSON, geography, vector search or row-level rules.
- Pick MySQL (or MariaDB) for WordPress and PHP stacks, or when your host offers nothing else.
The options
- PostgreSQLA powerful open-source relational database that runs as a server and handles everything from a small site to very large, busy products.
- MySQLOne of the most used relational databases on the web, behind WordPress and a large share of PHP sites. MariaDB is a community fork that works almost the same way.
More comparisons
- SQLite vs PostgreSQLBoth are relational and both speak SQL. The real difference is where they run: SQLite is a file inside your app, PostgreSQL is a server your app connects to.
- SQL vs NoSQL: PostgreSQL vs MongoDB vs FirestoreTables or documents is a choice that shapes how you model everything. Here is a SQL database next to the two document databases it is most often weighed against.
- PostgreSQL vs ClickHousePostgreSQL is built for running an app (many small reads and writes); ClickHouse is built for analysing one (a few enormous reads). Plenty of products use both.
- Prisma vs DrizzleThe two most used TypeScript ORMs. Both give you typed queries and migrations; they differ in how close they stay to SQL.
- Supabase vs FirebaseThe two backend platforms most often weighed against each other. Both give you a database, sign-in, storage and functions; the difference starts with the database: PostgreSQL tables against Firestore documents.
- Supabase vs Appwrite vs PocketBaseThree open-source backends that bundle a database, sign-in, storage and live updates. They differ mainly in the database underneath and in how much there is to run yourself.
Crafted in the dark. Shipped to the world.
Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.