6 ms·
I love PostgreSQL, regardless of the version as far as it's >= 8. Super efficient and reliable RDBMS yet less "enterprise" that Oracle. I always wondered why My
by csbubbles 10y ago
I love PostgreSQL, regardless of the version as far as it's >= 8. Super efficient and reliable RDBMS yet less "enterprise" that Oracle. I always wondered why MySQL gained more popularity.
- dijit 10y agoI hate how entrenched MySQL is. We had 6 months of testing a high-throughput database trying to get it to do the consistency and latency required for peak load to no avail. (Even to the point of replacing the kernel with a custom one, and using a faster memory allocator) PostgreSQL could do it with only minor configuration tweaks. It still took a further 1.5 years to get the central IT body of my company to allow us to use it, and we wouldn't have had that if our software didn't 100% require it.. I hate to imagine how other software that actually needs conversion is right now. sidenote: I've had many corruption issues from using MySQL, so I'm double-baffled.
- ZenoArrow 10y ago> "sidenote: I've had many corruption issues from using MySQL, so I'm double-baffled." MyISAM or InnoDB? Also, have you considered trying MariaDB?
- dijit 10y agothe consistency issues come from the handling of those filesystems by the control interface above it. I'm fairly certain innodb by itself is pretty decent, in fact you can configure away the horrible behaviour nowadays, but I'm usually called in when things go wrong- and people usually keep the defaults.
- allan_s 10y ago> I always wondered why MySQL gained more popularity. very simple 1. LAMP , you got everything packaged, and the database was MySQL 2. soon a lot of cheap hosting options had MySQL as the shared database options 3. phpmyadmin to administrate your website database from a website I may be missing some history on the PostgreSQL side, but at least ~10 years ago, MySQL was the de-facto option for the wannabe web developer.
- LaSombra 10y agoI may be wrong but I also credit that MySQL was way easier to administer and didn't have the concept of schema similar to Oracle's. You installed, ran the "mysql" client application to connect to the server and off you go. PostgreSQL requires you to run as a different user to configure it. As I said, I might be wrong, but that is my impression using PostgreSQL on Linux.
- sitharus 10y agoMySQL gained popularity in the late 90s/early 2000s because they took the opposite tactic to PostgreSQL. While PostgreSQL aimed to be a complete SQL rdbms and then become a fast one MySQL aimed to be fast then complete. Also MySQL chose defaults suitable for web application hosting so needed little out of the box configuration. This meant MySQL was popular in the dotcom boom, and certainly with PHP developers. So MySQL got mindshare even if it has many flaws. Similar to how perl was the language to use in the early web days.
- forinti 10y agoIn my experience, most people who used MySQL simply hadn't heard of PostgreSQL (which isn't hard to install either and probably performed well enough for everybody's requirements - at least everybody I talked to). I used to ask, because I found it baffling that someone would choose an RDBMS that wouldn't even check the size of a column.
- deleted 10y ago[deleted]
- btmorex 10y agoFor a very long time, MySQL had much, much better replication and some people would argue that it still does. It would be nice if MySQL were a little less lax in other regards, but replication is always going too be more important for production sites.
- cwisecarver 10y agoI'm a Postgres convert. I used MySQL back in the day because I'd heard of Postgres and everyone said tuning it was a nightmare. May or may not have been true but there's enough documentation and books now, and maybe the configuration has become simpler. I no longer hear that Postgres is hard to configure but that it's an OSS enterprise RDBMS that's continuely improving. Even better, I've experienced that improvement over the last few years.
- kalleboo 10y ago> In my experience, most people who used MySQL simply hadn't heard of PostgreSQL That just means the next question is, "why hadn't they heard of PostgreSQL"? It's not as if MySQL AB was taking out ads in the newspaper to create mindshare.
- threeseed 10y agoEasy. It's simpler to use. Even to this day I still have to Google how to list the databases in PostgreSQL on the odd occasion I need to investigate something. In most other databases eg MySQL, MongoDB, Cassandra etc it's as simple as "show databases"
- comboy 10y agoAll you need to remember is "\?". There's also pgadmin. Things you do more often seem easier.
- collyw 10y agonowhere near as intuitive as SHOW DATABASES.
- szatkus 10y agoIt's not simpler. MySQL has much worse autocompletion and bizzare default behaviors. In comparision \dt is not that bad.
- tech2 10y agoMySQL (at least earlier on) was _very_ fast for simple selects. This made using it for websites make sense. If all you needed was to display the result of a simple query (most websites) mysql was easy to use, very quick, and quite forgiving.
- anarazel 10y agoMy theory is a bit different: projects under a single entities control grow faster, but don't usually have better quality. For a while that works, but at some point the technical debt costs you.
- evanelias 10y agoIt is interesting to consider FreeBSD vs Linux from the same angle. Obviously not an identical situation, but there are definitely interesting parallels there for PostgreSQL vs MySQL.
- evanelias 10y agoMySQL's replication story has been mature for substantially longer than Postgres's. ~10 years ago, most of today's biggest social networks and other high-volume OLTP sites were starting to scale. Replication is essential and there was really no contest at the time. (EDIT to add specifics: pg added built-in replication in 9.0, released only 6 years ago.) Today the majority of the largest sites on the internet use MySQL either as their primary database layer or at least as an essential storage system: Facebook, Google, Twitter, LinkedIn, DropBox, Alibaba, YouTube, WordPress.com, Wikipedia, GitHub, Yahoo, Yelp, Pinterest, Etsy, Tumblr, Flickr, Uber, Box, Booking.com... and meanwhile I keep hearing about more moving from pg to mysql partially or entirely (Instagram, Lyft, etc) The result is that the MySQL ecosystem is huge. There are multiple distributions/branches, many third-party tools, expert consulting companies, knowledgeable people to hire. If you're scaling a high-volume OLTP site/app/product MySQL is a very reasonable choice. Postgres is a great database, and is a better choice than MySQL for many applications. But some people like to think it's strictly better than MySQL in absolutely every way and every conceivable situation -- this is demonstrably not the case.
- feld 10y agoMySQL's replication is not mature. There are too many edge cases / pitfalls where it doesn't replicate to slaves. It requires you to monitor for these situations and build systems to work around it. I don't know why anyone thinks this is OK. Postgres is late to the replication game but they have worked hard to make sure that replication doesn't have surprises. The character set is another nightmare that surprises novice MySQL admins... and then the fact that it allows schema operations to destroy data by default...
- evanelias 10y agoCan you cite examples in recent versions? In my experience, the defaults in recent versions (mixed or row-based replication, strict sql mode) are quite sane and prevent most historic problems. I don't have enough pg experience to make a valid comparison, but I have worked extensively on the largest mysql environment in the world (among many others), and can say that properly-configured mysql replication does not encounter the problems you are describing. Yes, there are a lot of pitfalls for novice admins to avoid. That's true of all databases to some degree. MySQL may well have more pitfalls than others, but it also has a much wider net of experts who can help you avoid these pitfalls. Anyway, by "mature" I was also referring to the sheer number of solutions offered, most of which are now battle-tested by many large users. Out-of-the-box in the latest version you get 2 types of logical replication (and a third type mixing the two), 3 options for level of synchronicity (async, semi-sync, and now sync via the new group replication), bidirectional replication, and multi-source replication. And there are additional third-party solutions for other synchronous replication setups (e.g. Galera), and even physical replication has been implemented internally by both Amazon and Alibaba.
- dgregd 10y ago> I always wondered why MySQL gained more popularity. Because of the first-mover advantage. When first web pages/apps were created there was no native port of Postgresql for Microsoft Windows. At that time Windows was the main development platform. Postgresql with Windows native support was released in 2005. https://www.postgresql.org/docs/8.0/static/release-8-0.html https://www.postgresql.org/docs/8.0/static/release-8-0.html