News for hackers. Stuff that matters.
Re:Is 20M of rows still a valid soft limit of MySQL table in... by pollux1997 on Monday May 22, 2023 @09:27PM (#36038744)
Thanks for repost the blog! Some crazy guys have already told me that they have mysql table >1.4B rows (~180GiB), underestimated mysql's power lol
Re:Is 20M of rows still a valid soft limit of MySQL table in... by mh- on Monday May 22, 2023 @09:39PM (#36038804)
My current employer has a single InnoDB table that is 14-15 TB.
Re:Is 20M of rows still a valid soft limit of MySQL table in... by nonethewiser on Monday May 22, 2023 @09:44PM (#36038835)
what is it?
Re:Is 20M of rows still a valid soft limit of MySQL table in... by mh- on Monday May 22, 2023 @09:48PM (#36038860)
Events that are enriched off of other data in the same DB.

The system design predates me, but it is solid (albeit difficult to operate at this scale - usual stuff like schema changes, replication bootstrapping).

Re:Is 20M of rows still a valid soft limit of MySQL table in... by numbsafari on Monday May 22, 2023 @09:57PM (#36038900)
What is your mean time to recovery like when you have to restart your system?
Re:Is 20M of rows still a valid soft limit of MySQL table in... by mh- on Monday May 22, 2023 @11:13PM (#36039347)
We keep hot masters (typical MySQL master-master-slave(s) setup) on standby.

Bootstrapping one from scratch (like if we need to stand up a new replica)? We restore a disk image on GCP from point in time snapshots, then let it catch up on replication. So it'll depend on how far behind it is when it comes online.

TLDR: a few hours in the worst case. ~Zero downtime in practice.

Re:Is 20M of rows still a valid soft limit of MySQL table in... by pbreit on Monday May 22, 2023 @09:56PM (#36038898)
How many rows?
Re:Is 20M of rows still a valid soft limit of MySQL table in... by bombcar on Monday May 22, 2023 @10:21PM (#36039047)
Three. But many columns.
Re:Is 20M of rows still a valid soft limit of MySQL table in... by arthurcolle on Monday May 22, 2023 @10:23PM (#36039056)
Trying to solve the three-body problem numerically? Haha you fools this was done years ago in FORTRAN
Re:Is 20M of rows still a valid soft limit of MySQL table in... by mh- on Monday May 22, 2023 @11:09PM (#36039327)
Several billion.
Re:Is 20M of rows still a valid soft limit of MySQL table in... by Sparkyte on Monday May 22, 2023 @10:00PM (#36038931)
I bet queries take minutes.
Re:Is 20M of rows still a valid soft limit of MySQL table in... by brootstrap on Monday May 22, 2023 @11:12PM (#36039342)
have worked on 20TB+ tables before. proper schema / index / query, shit is still fast as hell when you do it right
Re:Is 20M of rows still a valid soft limit of MySQL table in... by mh- on Monday May 22, 2023 @11:14PM (#36039356)
Yep, was just sharing this experience in the comments as well. By far the most painful part is schema migrations, and that's well-solved with pt-osc or gh-osc.
Re:Is 20M of rows still a valid soft limit of MySQL table in... by duskwuff on Tuesday May 23, 2023 @12:41AM (#36039900)
With MySQL 8.0+, you might not even need pt-osc. A lot of schema changes can be performed online now.

https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl-op...

Re:Is 20M of rows still a valid soft limit of MySQL table in... by SteveNuts on Tuesday May 23, 2023 @12:59AM (#36040023)
And still my coworkers who 20 years ago were burned by some MySQL minor issue will laugh at the mere suggestion that we could probably use MySQL.

People still think it's a toy to this day and they've struggled to shake that perception.

Re:Is 20M of rows still a valid soft limit of MySQL table in... by koolba on Monday May 22, 2023 @10:23PM (#36039058)
An indexed read should be no different than on a table with on the order of 100K rows. And that’s even with good ol’ spinning rust.

It’s all about logical I/O operations which, for an indexed read, would only be a handful regardless of size as it’s operating on a btree: https://en.m.wikipedia.org/wiki/B-tree

Now creating that index from scratch might take a while though…

Re:Is 20M of rows still a valid soft limit of MySQL table in... by spudlyo on Monday May 22, 2023 @10:27PM (#36039090)
How long does it take you to do a schema change?
Re:Is 20M of rows still a valid soft limit of MySQL table in... by hu3 on Monday May 22, 2023 @10:39PM (#36039157)
Big MySQL deployments typically use pauseless online schema changes tooling like gh-ost:

https://planetscale.com/docs/learn/online-schema-change-tool...

Re:Is 20M of rows still a valid soft limit of MySQL table in... by mh- on Monday May 22, 2023 @11:39PM (#36039518)
This is what we do. So "how long" is a difficult thing to put a number on, since you're intentionally throttling it to avoid impacting the database's performance (or building up slave lag).
Re:Is 20M of rows still a valid soft limit of MySQL table in... by icedchai on Monday May 22, 2023 @11:05PM (#36039300)
10+ years ago I worked at a smallish company and we had a table with over 500 million rows. This was on a high end system with several spinning rust disks in a raid 10 and 256 gigs of RAM. Billions in modern hardware seems quite reasonable.