4 ms·
I'm a big posgresql fan, but I'd maybe argue that you're making tradeoffs. PG has weird behaviour sometimes too. I don't think it's always smart to just change
by dijit 5y ago
I'm a big posgresql fan, but I'd maybe argue that you're making tradeoffs. PG has weird behaviour sometimes too.
I don't think it's always smart to just change out your data layer.
But, if you're starting a new project, I do think PG is one of the better options and tends to follow the principle of least surprise. (hence: big fan)
- leetrout 5y agoAs a huge Postgres fan working at a shop using MySQL I'll point out the first thing I saw MySQL does that Postgres doesn't: Index hints. If you aren't hitting an index in Postgres you have to dig in to table stats and figure out what is wrong but MySQL gives you more control. However, I would still rather work with Postgres AND have to juggle a connection pooler than deal with MySQL. Transactions on DDL are _great_ and the ability to use foreign keys across partitioned tables is how it should be.
- spookthesunset 5y agoBut at least Postgres has much better tools for learning about the query plans it might use. The Postgres output of “EXPLAIN” is much much better than MySQL. It’s a shame that almost every job I worked at uses MySQL and not Postgres. But that could be because those companies all got their start like a decade or more ago when Postgres was not as well known.
- pzduniak 5y ago> As a huge Postgres fan working at a shop using MySQL I'll point out the first thing I saw MySQL does that Postgres doesn't: > Index hints. Eh, it's an extension. One you shouldn't use, but it's there.
- leetrout 5y agoI didn't know this!
- samcrawford 5y ago> I would still rather work with Postgres AND have to juggle a connection pooler Is this comment relating to the overhead of idle connections, which has historically necessitated the use of a pooler in front of PG? If so, I believe this is resolved in postgres 14 https://pganalyze.com/blog/postgres-14-performance-monitoring https://pganalyze.com/blog/postgres-14-performance-monitorin...
- hn_throwaway_99 5y ago> PG has weird behaviour sometimes too. Perhaps, but I'd argue that the "weird" behavior of postgres just tends to be clearly thought out design decisions that they made for a valid reason that may cause you some pain with how you use it (e.g. their process-per-connection model). MySQL's "weird" behavior, on the other hand, just tends to be completely invalid footguns like this. Despite what some people are arguing in this thread, a 3-byte version of UTF-8 was never in any spec anywhere and was an invalid shortcut from day 1.
- ipaddr 5y agoOracle, Postgres, MySql, mSql, sqlite all make weird behaviour in different situation. You pick your poison. I hated how postgres forced you to create a system user to connect I wonder if it still requires this.