5 ms·
https://db-engines.com/en/ranking https://db-engines.com/en/ranking It seems like Everytime on HNs people say postgre is so much better. Why is MySQL so much m
by samfisher83 10y ago
https://db-engines.com/en/ranking https://db-engines.com/en/ranking
It seems like Everytime on HNs people say postgre is so much better. Why is MySQL so much more popular?
- tajen 10y agoBecause MySQL looks easier for people who have never done SQL, which allowed to be the M in the LAMP stack and the only suported db for Wordpress. I had little experience with Oracle SQL at school, and MySQL's bad design became very apparent to me, even when I was a junior dev. I'm afraid devs are repelled from SQL because all they've seen is MySQL. Postgres has everything Oracle has, with an even better design, and minus the price.
- wolco 10y agoI am a big supporter of all open source and would choose pg over oracle for most projects. Oracle has many things pg does not
- lima 10y agoLegacy systems, tooling + operational experience, better clustering (for now). PostgreSQL wins at everything else and the gap is closing fast.
- samfisher83 10y agoPostgre has been around for a very long time too so why did postgre never catch on?
- evanelias 10y agoThe largest MySQL-based companies have the resources to switch to another database if there was a compelling reason, but they do not do so. The db fleet sizes of these companies also dwarfs that of the largest companies using Postgres. The "legacy systems" argument is faulty logic. Facebook is in the process of changing MySQL storage engines (from InnoDB to MyRocks), which is a massive migration involving a large number of engineers, yet they're still staying with MySQL overall because it's the best fit for their OLTP workload. Since pg doesn't even support pluggable storage engines, it would be a total non-starter, among many other reasons.
- lima 10y agoThanks for the insights! I'm actually using MySQL (MariaDB, actually) in production because it does work fine, does all we need in an OLTP data store, ops tooling is very good and we need reliable multi-master (Galera) for load balancing. I'm not an expert on databases, but I've heard so many DBAs tell me how PostgreSQL is superior with regards to features + correctness (features that I don't actually need for our use case, but still) except for scaling out. What's your take on this? If you were to start on a green field, what database would you recommend for a typical SaaS/OLTP workload?
- evanelias 10y agoI'd say it depends on your team's level of knowledge on various DB's, the expertise available in your geographic area, and the expected size that your data set would grow to. I'm not sure there is a "typical" workload in the general case ;) Don't get me wrong; Postgres is a really really good piece of software with many appealing qualities. But its fanbase is a bit overly rabid, or at least over-eager to trash MySQL for things that haven't been true in years or never were true in the first place. There are some very valid MySQL complaints mixed in there too, but it can take some effort to separate them out...
- lima 10y agoThanks! Our team is definitely going to stick with MySQL (no reason not to) and I have no reason to hate it, but I always like these sort of comparisons since you learn a lot about the technology. I'm really interested in PostgreSQL for "real time OLAP" use cases with things like Citus - apparently, many companies use Citus in particular to run distributed analytics queries on their main database.
- i336_ 10y agoHmm. Have you seen any wholesale feature comparisons between the two that you'd consider objective and fair, and which debunk old myths in the process?
- 10y ago
- falcolas 10y agoWhile PostgreSQL was finding its legs, MySQL was offering a complete solution. PosgreSQL was also missing a replication story for quite awhile, while MySQL was allowing for simple and native replication when it was needed. PosgreSQL now has its legs, and has a native replication story (incomplete, but improving), but MySQL has a lot more intertia, and has also been improving in that same time. As a result, MySQL just has more (and thus less expensive) experts, which makes a big difference when picking a DB for your company.