Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> MySQL

What‘s the point of it, by the way? Why would one start a new project based on MySQL instead of postgres today?



Because you know it better? Same reason as for most technical decisions tbh.

Besides that, there are still some points where the MySQL and/or the tooling around it simply performs better than Postgres. Anything to do with replication and big table migrations comes to mind.


Not an expert, but briefly looking into this, MySQL is

1. easier to configure and manage

2. faster for read-heavy workloads

3. has pluggable storage engine (though, if you care about this, then 1. likely doesn't matter anymore)


Just as a note, Postgres also has pluggable storage engine, using their tableam API.


It's much less emphasized compared to MySQL, I didn't even know about it until your comment, and search results are sparse.

MySQL has had multiple viable storage engines for most of its existence. MyISAM, InnoDB and more recently MyRocks.


You might be able to argue that Postgres' foreign data is a different form of pluggable storage engine. E.g. you can even use a CSV file as a backing store for a table with file_fdw.

https://www.postgresql.org/docs/current/ddl-foreign-data.htm...

https://dbaclass.com/article/how-to-access-csv-files-on-file...


Someone should do an experience report on adding the same storage system to both databases.

What you say looks powerful but Facebook added their MyRocks to MySQL.


MySQL has an actively maintained LSM-tree based storage engine like MyRocks, while Postgres doesn't have production-ready options in that regard.


Why is LSM useful for a RDB workload?


Log Structured Merge Trees are superior in write volume and scaling B+ trees higher. LSMs are part of the sauce of Cassandra and (I believe) DynamoDB for horizontal scaling.

RocksDB is a single node very efficient (better than Cassandra's in the 2.x/3.x releases, not sure about now) single node LSM implementation.


Had Oracle stopped investing into MySQL, may be people would have moved on. But they didn't. Just like when people were worried about JAVA, instead we have 15 years of continuous improvement. And that is the same with MySQL. There are lots of features MySQL has as defaults, while postgres simply accept it is not something they want to deal with but leave it to extensions.


I would choose MySQL because I'm more familiar with it and it's good enough for what I need. PostgreSQL might be able to give me better benchmarks but it won't have any meaningful benefit for me the developer or for the user.


Benchmarks are not the reason people choose PostgreSQL over MySQL. I have never even bothered to benchmark the two for any project that could have used either.

Features, better ACID (at least historically) and maybe better standards compliance.

The big one for me is being able to run schema changes in transactions, which makes it easy to roll back a failed migration.


Also, the license. PostgreSQL is controlled by the open source community via a nonprofit organization.


True, but I would say governance rather than license.

Not being Oracle is a huge advantage ;)


Multi-master replication out of the box. Very useful, very occasionally.


Because it may be good enough. In my case, because I already maintain an instance of MariaDB in production, and I may prefer to share this that maintain another thing


I personally also prefer postgres but I have used mysql in the past as well on and off over the last 20+ years or so. Managed postgres was at some point slightly more expensive in Amazon for some reason. So that's a good reason. If all you need is some simple database, either is fine.


Because I make money with WordPress.


I wouldn’t, only because the big O is behind MySQL.

Otherwise, why not? It’s basically a Chevy vs Ford decision.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: