Ask HN: It is 2023, how do you select between MySQL and Postgres?
|
Yes, for over half a decade at least, but “binlog” is a MySQL term, for postgresql it has the much more apt name: write-ahead log.
it is the only official, in-binary replication mechanism. |
|
Choose whichever one you/your team is more familiar with. Both are battle-tested and proven and will likely scale to whatever needs you have.
|
|
Friends dont let friends use #Horracle software.
That includes VirtualBox, MySQL, Horracle Cloud. Just step back. Walk away. Do not pass go, do not collect $20000 lawyers fees for unintended actions. |
|
The difference is not significant enough to matter for most projects, esp just starting out. Hence, I mostly choose Postgres, since I don’t like Oracle as a company very much.
|
|
Also interested in the responses, not because it seems like a close decision but because I would pick postgres by default for anything (anything that isn’t simple enough to be done in sqlite).
|
|
If Postgres was that much better than MySQL then you would expect to see exact reasons on why to pick it. Every comment so far has not listed any reason.
|
|
Ah, that’s good to hear. I haven’t looked seriously at databases other than SQLite for a long time, it would be interesting to see a more up to date evaluation.
|
|
I like SQLite. But I really wish its default behavior wasn’t to simply allow garbage data into the database. If I have an int column, don’t let me accidentally store a string.
|
|
https://www.sqlite.org/stricttables.html
“In a CREATE TABLE assertion, if the “STRICT” table-option key phrase is added to the top, after the closing “)”, then strict typing guidelines apply to that desk. … The STRICT key phrase on the finish of a CREATE TABLE assertion is barely acknowledged by SQLite model 3.37.0 (2021-11-27) and later.
|
|
Here’s a good place to start:
https://www.sqlite.org/whentouse.html https://www.sqlite.org/quirks.html Full-scale RDBMSs, particularly Postgres, have heaps of goodies that both SQLlite would not have (or which it does have, however which are not so richly featured). As soon as you have gotten hooked on a couple of of those, the excellence will really feel much more clear. In the meantime the tipping factors in favor of SQLite appear to be embedded methods, and its entire “service-less” structure and plain ease of use. Which is why it nonetheless will get a lot of love, for these contexts. |
|
MySQL is still ahead operationally (no vacuum, group replication, gh-ost, optimizer hints, etc.). I would choose it unless one of the Postgres extensions is a killer fit for your project.
|
|
Most answers seem written by fanboys rather than legit answers.
I would say go with what you know and are most comfortable with. You are more likely to get the better outcome. |
|
Friends don’t let their friends choose Mysql 🙂
A super long time ago (decades) when I was using Oracle regularly I had to make a decision on which way to go. Although Mysql then had the mindshare I thought that Postgres was more similar to Oracle, more standards compliant, and more of a real enterprise type of DB. The rumor was also that Postgres was heavier than MySQL. Too many horror stories of lost data (MyIsam), bad transactions (MyIsam lacks transaction integrity), and the number of Mysql gotchas being a really long list influenced me. In time I actually found out that I had underestimated one of the most important attributes of Postgres that was a huge strength over Mysql: the power of community. Because Postgres has a really superb community that can be found on Libera Chat and elsewhere, and they are very willing to help out, I think Postgres has a huge advantage over Mysql. RhodiumToad [Andrew Gierth] https://github.com/RhodiumToad & davidfetter [David Fetter] https://www.linkedin.com/in/davidfetter are extremely useful people. I do not know that Postgres’ licensing made an enormous distinction or not however my notion is that there are a ton of third occasion merchandise primarily based on Postgres however personalized to particular DB wants due to the extra liberalness of the PG license which is MIT/BSD derived https://www.postgresql.org/about/licence/ A few of the PG primarily based third occasion DBs: Enterprise DB https://www.enterprisedb.com/ – normal goal PG with some variants Greenplum https://greenplum.org/ – Information warehousing Crunchydata https://www.crunchydata.com/products/hardened-postgres – excessive safety Postgres for regulated environments Citus https://www.citusdata.com – Distributed DB & Columnar Timescale https://www.timescale.com/ Why Select PG as we speak? In order for you higher ACID: Postgres In order for you extra compliant SQL: Postgres In order for you extra customizability to quite a lot of use-cases: Postgres utilizing a variant In order for you the pliability of utilizing NOSQL at occasions: Postgres In order for you extra product data reusability for different backend merchandise: Postgres |
|
If you are using .NET then Postgres might be better choice. (much better support for drivers and default ORM).
If you need replication go with MySQL. |
|
> What sort of functional requirements would cause you to choose one over the other?
Simple: I don’t like having headaches. Therefore, I chose postgres. |
|
Why is mysql better for quick and dirty? I feel like pg extensions offer a lot more “dirtiness” running inside pg than mysql has.
|