Why do big companies seem to use MySQL over PostgreSQL
Posted by InternetAnima@reddit | ExperiencedDevs | View on Reddit | 8 comments
A bit of a deviation from standard soft skills questions here.
I've noticed a pattern, which could very well be biased: while PostgreSQL has gained enormous popularity in the industry, a lot of bigger companies still use MySQL (like Slack or HubSpot, for example).
Is it mostly due to sharding / Vitess or is there something else at play? Or have I just been misguided by specific examples?
kleinsch@reddit
Ten years ago MySQL was the leader, the trend has shifted to Postgres since then, so it’s just based on when companies started. HubSpot was founded in 2006, Slack in 2009.
proverbialbunny@reddit
Yep. Back then MySQL and PostgreSQL were roughly equal in speed and features. MySQL had better marketing so people defaulted to it. Then MySQL stagnated. The MySQL of today is for all intents and purposes is identical to the one 15 years ago. PostgreSQL kept moving forward adding more feature support and it became faster than MySQL.
Today if you see a new project use MySQL it's out of ignorance due to old branding. Today as far as I know there is zero reason to use MySQL. When possible default to PostgreSQL over MySQL.
sreekanth850@reddit
Can you tell me a elegant solution for high availability with postgres like what mysqlrouter does? Most of the time, its not the ignorance but things just works simple with mysql. I agree your statement about postgres. but with a lean team, where there is no any dedciated DBA or devops. Its bit easy to spin up an innodb cluster with mysql router to have HA setup from day 1 with team of 3 or 4 alltogether. When i say High availability, i mean auto failover and routing. In long run it can be easy to migrate to vitess or xtra DB cluster to scale when data grows.
K3dare@reddit
I would say patroni is the best solution so far to have H.A with PostgreSQL
sreekanth850@reddit
On the top of kubernates right? IMO, with zookeeper and kubernates, it will be one of the complex setup for something to start with for a small team.
K3dare@reddit
No in our case we are using standard GCP instances for this (configured with some ohme made Ansible), you don't need K8S for that.
Patroni works fine but I am not a big fan of it (the code quality is very bad as I had to dig into to write some custom automations)
K3dare@reddit
MySQL today has nothing comparable with MySQL from 15 years ago.
PostgreSQL still has no H.A after all this time. (Replication alone is not H.A) or TDE for example.
sreekanth850@reddit
This. Many time, people look at all bells ad whistles, but on a larger picture they ignore things like High availability which is critical for a production grade setup. high availability oesnt means you have replication, but automatic fail over with routing the live nodes. This is why we decided to choose mysql. In long run we plan to migrate to vitess or percona xtra db cluster.