Hey, Threadiverse! I’m looking for informed opinions on database choices.
I can stand up an Internet-facing application and have it use either MySQL or PostgreSQL. Which is the better choice, and why do you think so?
Thanks!
As someone that admins hundreds of MySQL at work, I’d go with PostgreSQL.
Yeah, every time I find some weird annoying behavior or some missing feature in MySQL, PostgreSQL is doing it right.
That said, also ask yourself if you really need a relational database, or whether an object store or append-only / timeseries db would fit better.
Postgres. It’s more strict by default, which leads to a lot fewer surprises.
Here’s my rule of thumb:
- SQLite - if it’s enough
- Postgres
- MariaDB - if you don’t care about your data and just want the thing to work
- MySQL - if you sold your soul to Oracle, but still can’t afford their license fee
- Something else - you’re a hipster or have very unique requirements
Postgres, hands down. It’s far better than MySQL in every way.
PostgreSQL is just better. It’s supports transactions on DDL (things like altering table structure) and enforces unique constraints after transactions complete … so you can actually do a bunch of important stuff (like update your table structure or swap unique values between rows) safely.
As somebody who just watched a team implement MySQL for an app that only supported Postgres, I’d go with Postgres.
I never want to use MySQL again. Postgres or SQLite for relational databases.
Ha! My deepest experience with postgres was watching it fall over and wedge daily when run behind red hat’s satellite (the flailing lame foreman one, not spacewalk).
Wow, was it ever a dog. Yeah, I get it: the company who shat Systemd on the planet can’t be asked to do much better, but still.
So, you fucked up and it’s postgres’ fault?
Postgres is a more robust and better designed and developed product, also it’s not owned by fucking Oracle.
Another vote for Postgres, MySQL kind of blows.
Avoid MySQL and MariaDB at all cost.
I used MariaDB for school projects, what exactly is wrong with it? Asking because I’m just unaware
While there was a time, where those databases were considered “good”, they are only this famous because they have been free or open source for ages. Professors love open source stuff. This does not necessarily mean it is a good product in terms of database functionality. They have been stuck in the old age and simply get outperformed by almost anything. Professors also hate to change their slides and to learn something new. Because their priority is on functionality, not on real world use. And when you want to use a product in the real world, non-functional properties gain a lot of value. One of them is performance.
If you want to have a fast, reliable, open source database, use ClickHouse.
Click house is for OLAP workloads
It was. Now compare the benchmark of OLTP tasks and you will be surprised
You aren’t exposing the database right?
Hardly anyone ever says mysql is better. Postgres has a lot of nice features, But they’re still a hell of a lot more people out there with mySQL experience.
If for some reason you really want to go mysql I would urge you to look into percona and percona tools. It’s incredibly fast super optimized. The tools let you do backups that my sequel could only dream of.
That said, if you don’t have any strong needs for mySQL, and you don’t have any experience with it I would probably start picking up postgres.