top | item 43076702

(no title)

wbercx | 1 year ago

> Generally friends don't let friends use Mysql

What drives this sentiment?

discuss

order

mianos|1 year ago

Things that are missing in most other proper databases, like transactional DDL. If you don't mind not having them, Mysql is fine. It's probably better than Postgres for mostly read databases, which is most uses. There was a time when Mysql was by far the most used but over the years it's growth has been fairly slow and Postgres has kept growing in use, mainly due to functionality and integrity.

People say 'Facebook uses Mysql', but if a page fails, you just refresh. Most of the time the page is different so if everything is broken in the back end no one cares. Same with ad tracking (I have written code to check impressions via second sources).

If I refresh my bank balance I want to see the same. That's why they use Posgtges (yes the bank I worked on), or some commercial thing like SQLServer or Oracle, where integritry is more highly important.

evanelias|1 year ago

> People say 'Facebook uses Mysql', but if a page fails, you just refresh. Most of the time the page is different so if everything is broken in the back end no one cares.

You seem to be under the impression that MySQL just "fails" on random read queries? That is nonsense.

In reality Facebook's db fleet is a massive sharded system, and sometimes shards are temporarily offline due to hardware failure on the shard's primary/writer node, but it's quite brief in the vast majority of cases. When you have such a massive number of servers, hardware failures happen many times a day.

Due to caching and other services it's also a multi-leveled data access stack, so a page load could fail due to some non-MySQL component having problems as well. Or a network issue, etc. It's not magically MySQL's fault every time something goes wrong at Facebook.

Meta uses MySQL for a variety of mission-critical use-cases, including financial ones. Every single committed MySQL write is replicated before success is returned to the calling code, nothing is lost or thrown away.

> Things that are missing in most other proper databases, like transactional DDL [...]

> some commercial thing like SQLServer or Oracle, where integritry is more highly important.

And yet Oracle DBMS does not have transactional DDL either, so why aren't you equally critical of it here?

hu3|1 year ago

In 2025? Often a tribalistic ignorance of holding outdated preconceptions against MySQL.

A quick search hints me that there is still more ultra-large MySQL setups than there are PostgreSQL. By a large margin it seems.

Between easier upgrades/HA, thread connection model, Vitess and engines like MyRocks, it's hard to beat for many use cases.

guitarbill|1 year ago

Time and survivorship bias can explain the ultra-large MySQL usage, given it used to be the popular choice.

WJW|1 year ago

MySQL used to have some rather dodgy defaults way back and some people haven't touched it for decades and assume it's still like that. Also it got acquired by Oracle at some point and many people just hate Oracle. Finally it is now cool to love Postgres more, or sqlite.

MySQL is fine, boring tech that powers a great many companies. There's nothing wrong with choosing it for a new venture, but there's also nothing wrong with another choice. Which RDBMS you use won't be the deciding factor in your success these days.

cies|1 year ago

We're using MySQL and collectively wish we were on Postgres.

It's waaaay more quirky in our experience.

Also: Oracle hate is not unwarranted, even in this day-and-age.

> There's nothing wrong with choosing it for a new venture

I'd advise anyone in that position not to choose MySQL. Go with Postgres unless you have a good reason not to.

cess11|1 year ago

MySQL 5 had bad defaults. Some would probably argue that hooking into sudo rather than a dedicated databaser user amounts to one. MySQL is also perceived by some to be a software for amateurs.

Unless you need the kind of sophisticated extensions Postgres supports MySQL is likely to be a good fit. The query planner is straightforward, performance tuning slightly more predictable and easy compared to Postgres.

kaptainscarlet|1 year ago

MySQL is more user friendly. Examples are, autoincrement vs postgres sequences, case sensitivity, users ans databases are straightforward on mysql vs roles, dbs and schemas on postgres. Replications are also easy to setup on mysql.

evanelias|1 year ago

> Some would probably argue that hooking into sudo rather than a dedicated databaser user amounts to one

What are you referring to here?

asddubs|1 year ago

same as php hate, mysql had some questionable design decisions and legacy hacks, which are mostly not that relevant today except for causing some warts on the interface (like e.g. utf8mb4, mysql_real_escape_string)

cies|1 year ago

Very similar to PHP indeed!

PHP is also something I'd not advise anyone to use on a greenfield app unless you have really good reasons for doing so.

There are much better --also very conservative-- stacks available for free (and no, those are not JS based).

For instance: Kotlin, http4k, JTE/KTE (or kotlinx.html), SQLDelight, Postgress.