by mooneater · 3y ago · 0 comments
I migrated to them in 2005 (from mysql) and was amazed by how much happier I was. And it never cost me a dollar.
I loved it so much I visited its authors in Victoria and bought consulting from them. They are amazing folks.
But Postgres wins hands down once the queries get slightly more complex, for larger numbers of concurrent UPDATEs, and kicks the pants off MySQL with a RETURNING clause where you don't have to perform a followup SELECT after each write, especially to get the new ID. (Necessary for writable CTEs and explains why MySQL doesn't support them.)
And don't get me started on MySQL's lack of range types and their associated indexes. Exclusion constraints can be a godsend to data validity.
MySQL has improved greatly since 8.x, but it's still very far behind the capabilities of Postgres, MS SQL Server, DB2, and Oracle.
MySQL does simple things fast though not as fast as SQLite. It's getting squeezed on the high end by all the other big SQL vendors and squeezed on the low end by SQLite. It lives in a functionality gap that keeps getting narrower and narrower.
MySQL is very capable until it isn’t.
I’m surprised how many of the hundreds of hours of tweaking that were needed in MySQL when reaching scaling issues aren’t.
I realize most people will try to pick the best, but there is none. MySQL is perfectly good to learn and use at the same time as Postgres.
Postgres can be more complex out of the box but some of the things it has are too hard to ignore.
While I can use the command line, I prefer to have something with good tooling to help create beginners. Postgres is behind here.
I decided to use Postgres for a project and it was too much of a headache compared to MySQL - it was new to me as well, until I reached a problem that it solved without issue and MySQL had tripped up at. In this case I was dealing with tens of millions of rows as a starting point.
Learning to do something the Postgres way compared to how my brain knows how to use MySQL has been helpful and slowly improving.
It's second best (or third) for the stuff that historically made people abandon relational databases. But it's absolutely the best choice for its core functionality.
(But well, Python is the best system scripting language around. So the phrase was always an exaggeration.)