Hacker News new | ask | show | jobs
by jpitz 2098 days ago
As much as I vastly prefer PostgreSQL, I will tell you that MySQL is much more preferred in enterprise settings, probably 8 to 1 in the environments I've seen.
3 comments

> As much as I vastly prefer PostgreSQL, I will tell you that MySQL is much more preferred in enterprise settings, probably 8 to 1 in the environments I've seen.

That's largely because enterprises often have big investments in SQL server, OracleDB, and/or DB2, and are only using open source engines for more lightweight purposes, and/or as part of cloud transitions where they are just taking vendor default options or whatever options was supported when they came on or longest.

At least, that's my experience working in enterprise and being literally the single voice urging even considering pros and cons before using MySQL-by-default with no particular rationale in a transition effort (which resulted in us using Postgres.)

I work as a consultant in the enterprise space, and I've seen a shift in recent years towards Postgres.

I believe this has largely been driven by cloud - developers are now more able to choose the components they want to work with, instead of being told what to work with. There are of course plenty enterprises that are strict here, mandating cloud hosted SQL Server for example, but the general relaxation of constraints has struck me as a very pleasant surprise.

I've yet to come across MySQL being used in a cloud-based system, but I'm seeing Postgres more and more. When I do see MySQL, it's part of on-prem services that are considered "legacy".

One of my contacts is migrating databases between clouds, with MySQL being the most common, followed by sql server, then PostgreSQL.
That's likely a holdover from when mysql had a better replication story than postgresql. I think enterprises will come around.
> That's likely a holdover from when mysql had a better replication story than postgresql.

What is the Galera-equivalent in the Postgres world? There's BDR, but the latest versions are closed source.

We use Galera in a bunch of places because it's fairly straight forward to get an HA cluster going, and with keepalived, we can point a front-end to a vIP that fails over automatically if one system goes sideways.

afaik, MySQL never had a better replication story than PostgreSQL, you've always had to use Percona's add-ons to get something workable. Even then (many years ago), we had multiple data loss incidents that were precipitated by widespread internal confusion over the bizarre intricacies of `binlog_format`.

Like most software that gains adoption, MySQL made some very broad claims about their software's capabilities and never really delivered on them, at least not in a way that would be considered production-ready by Serious Persons(TM).

That's the crux of MySQL v. PgSQL, Linux v. BSD, etc. Good engineers spend their time building good software and are generally too focused on that to spend much time going around and making outlandish promises. Postgres has benefited from Oracle's intentionally-bad stewardship over MySQL, but it doesn't usually work that way.

I've experienced this as well, and it's almost always because the tooling for MySQL is "better." I don't necessarily agree, but Sequel Ace (formerly Sequel Pro) is hard to beat.
> "better."

Inertia is what I've noticed as well. The few people I've convinced to actually try out postgres have ended up liking it more than mysql.

TablePlus is a great alternative for Postgres (and many other DBs) for that on Mac & Linux IMO: https://tableplus.com/
Oh how I wish Sequel Pro/Ace worked on Postgres.
The DB support in Jetbrains IDEA is awesome, they also have it as a stand alone IDE called Data Grip, could be woth a shot? https://www.jetbrains.com/datagrip/