Earlier quoted context omitted.
Having used postgres for the past decade, I tried MySQL for a side project to see whats changed with it. The sad answer is that it feels like nothing has changed - Oracle seems to have let what used to be a core technology of the industry languish. I'm sure there are use cases where MySQL will be the better choice over postgres, but the future for the stack looks bleak.
Oracle seems to have let what used to be a core technology of the industry languish I think slowly squeezing the life from MySQL was a very explicit goal for them. After the big wins (Wal-Mart, etc) MySQL had 15-20 years ago I think it was very clear MySQL was going to chip away at more and more of Oracle's business. I wonder how much Oracle spends on MySQL every year? They're spending a lot of money to keep MySQL at…
Ask HN: It's 2023, how do you choose between MySQL and Postgres?
221–230 of 366 posts
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#222There is almost no good reason to choose MySQL over PostgreSQL for any operational reason, I did a deep dive many moons ago (before major improvements in performance to postgres) and people were saying that MySQL was faster. I found that not to be true and the differences have only gained even more favour towards postgres. also, I assume you mean MariaDB as MySQL is owned by Oracle and I would greatly implore anyone…
PostgreSQL has memory tables too.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#223A lot of comments for Postgres, but it's the only major DB in 2023 that does not let you choose your character collation when creating a database. That is pretty much a deal breaker day 1. Guess you'll be doing a tolower() on every db search and not use indices which will kill performance or using column collation casts on every search query. I just don't get it. I once tried to migrate a SQL Server DB to Postgres an…
Am I missing something here? Postgres does allow you to choose character collation when creating a database, as well as when creating new columns.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#224Unpopular opinion on HN apparently, but MySQL - It's less featureful, and I'd consider that a strong virtue in the YAGNI camp - less to go wrong, less mental overhead. - Maintenance is simpler and far less necessary in my general experience. - Replication is simpler and more reliable. - You can tell the query optimizer what to do. When this is needed, you'll be thankful. It's a godsend. That said, I wouldn't run Orac…
What's the ratio of solving DB perf issues by optimizing it and letting the planner do its work, to telling it what to do? For me it's like 1000:1. And that one case I remember was perfectly solvable the regular way, with a little more time.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#225There is almost no good reason to choose MySQL over PostgreSQL for any operational reason, I did a deep dive many moons ago (before major improvements in performance to postgres) and people were saying that MySQL was faster. I found that not to be true and the differences have only gained even more favour towards postgres. also, I assume you mean MariaDB as MySQL is owned by Oracle and I would greatly implore anyone…
MySQL is certainly faster for writes. https://www.uber.com/blog/postgres-to-mysql-migration/
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#226PostgreSQL. The answer has always been PostgreSQL, even at the height of MySQL's popularity and LAMP craze.
It is a VASTLY better piece of software and ecosystem - yet it's boring at the same time - all things I demand from the DB system whether it's a toy project or an enterprise app.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#227Unpopular opinion on HN apparently, but MySQL - It's less featureful, and I'd consider that a strong virtue in the YAGNI camp - less to go wrong, less mental overhead. - Maintenance is simpler and far less necessary in my general experience. - Replication is simpler and more reliable. - You can tell the query optimizer what to do. When this is needed, you'll be thankful. It's a godsend. That said, I wouldn't run Orac…
I would disagree on maintenance being simpler. I have never had Postgres randomly munge a table and require me to run a command to fix it.
I do remember getting bad tables with myisam tables a decade ago, sometimes after a bad shutdown.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#228There is almost no good reason to choose MySQL over PostgreSQL for any operational reason, I did a deep dive many moons ago (before major improvements in performance to postgres) and people were saying that MySQL was faster. I found that not to be true and the differences have only gained even more favour towards postgres. also, I assume you mean MariaDB as MySQL is owned by Oracle and I would greatly implore anyone…
Postgres is >50x slower for range queries(example below) and is akin to using array-of-pointers (ie Java) whereas MySQL supports array-of-struct (C). Illustration from Dropbox scaling talk below. Sneak peek photo [1] (from [2]). Just imagine its literally 500-1000x more convoluted per B-tree leaf node. That's every Postgres table unless you CLUSTER periodically. [1]: https://josipmisko.com/img/clustered-vs-noncluster…
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#229I know it seems dumb, but postgres really needs to add the simple developer experience stuff like: SHOW CREATE TABLE; SHOW TABLES; SHOW DATABASES; SHOW PROCESSLIST; CockroachDB added these aliases ages ago.
I forget if there's an equivalent for the first one, but from psql there is a translation of mysql's "DESC table" as "\d table", and the rest are: \dt \l SELECT * FROM pg_stat_activity;
Not really; PostgreSQL doesn't store the original query, so you'll need to re-create it from pg_class, pg_attribute, and all of that (which is really what \d and such in psql do). The easiest way is probably pg_dump, but it's best to just get used to \-commands because it's really just the same thing.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#230Earlier quoted context omitted.
> avoid Oracle as if it has herpes herpes isn't that bad. most people will get it in their lifetime. 1 in 6 people have hsv-2, the less common variant. trying to avoid herpes is like trying to avoid chickenpox (although herpes isn't nearly as harmful as chickenpox). you should avoid Oracle like it's a blood pathogen.
As a person who has herpes firmly in his nerves, I would say don't underestimate herpes.
Another related site: http://orthomolecular.org/resources/omns/index.shtml (scroll down for articles).
None of the above will help though in deciding between Postgres or MySQL ;)