Postgres for anything with a single database size But if you need something that can handle 100TB+, go Vitess(mysql compatible).
Ask HN: It's 2023, how do you choose between MySQL and Postgres?
251–260 of 366 posts
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#252I find PostgreSQL permission management quite convoluted. In MySQL it is simple to query for what grants a user has, but in PostgresSQL you need to write 100 lines of SQL to do the same... and you can't run \du and other commands without psql. Why couldn't they just come up with `SHOW` shortcuts that work in any SQL client?
I also highly recommend investing in psql skills though if you are a Postgres user.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#253Earlier quoted context omitted.
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;
> I forget if there's an equivalent for the first one 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?
#254Earlier quoted context omitted.
I highly suggest investing time learning psql, autocomplete works great and it has a ton of useful slash commands. \d for instance shows you the list of tables. Awesome tool
I don't need it often enough to invest the time. I generally set up a database as backing store to some project, fiddle with it until I'm happy it's working at the scale/performance I want, and then move on to something else. During those few weeks I'm actively using the database on the project, I can either get frustrated beyond belief with the CLI for Postgres, or just use what's at hand with MySQL. In fact, these…
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#255The Postgres query optimizer is more powerful than the MySQL query optimizers [1]. It generally scales better for OLTP. Also tons of extensions that can accelerate your workload. [1] - https://ieeexplore.ieee.org/document/9537400
It's also more opinionated than the MySQL query optimizer, in that you can't give it hints to prevent it from making a horrible mistake.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#256Having answered this a ton over the years, don't want to really take shots at MySQL. But Postgres stands in pretty unique ground. 1. It's solid as a really reach data platform (more than just a relational database). It's extension framework is quite unique compared to others. It's JSONB support was the first among other relational databases and is feature rich and performant. Multiple index types. Transactional DDL.…
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#257Earlier quoted context omitted.
(Full disclosure, I work for Oracle) Anyone who says no investment has been into MySQL I suspect never took the time to read the features/release notes for MySQL 8 https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
Didn't 8 ship 5 years ago?
Very recently they've mentioned they'll be changing this again to have separate LTS releases, which is a positive change stability-wise.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#258Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#259The main reason I prefer mysql over PostgreSQL is that mysql is just more consistent - in its commands, quirks, etc. Postgres - is it pg, pgsql, psql, postgres, postgresQL? The answer is "yes." Plus the case behavior for tables and column names drives me crazy. It's like some leftover VMS shit. I mean seriously fix it. Can you or can you not use a capital letter for a table/column name? I can never remember. Or you c…
Learning any new CLI client is a bit daunting at first. With repetition and intention, I think the commands become very memorable. Eg “describe table” is “dt”.
Re: Ask HN: It's 2023, how do you choose between MySQL and Postgres?
#260Earlier quoted context omitted.
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.
Postgres query planner suddenly deciding to do something silly in the middle of the night has taken Notion down a few times. It's quite annoying, and it's very frustrating to have no recourse.