News for hackers. Stuff that matters.
Re:Leaving MySQL by txdv on Monday December 06, 2021 @01:26AM (#29456813)
Just sticking with your old horse, has its problems, but you wont get surprised by new ones
Re:Leaving MySQL by Spivak on Monday December 06, 2021 @10:29AM (#29460893)
And the fact that the community and tooling surrounding MySQL is absolutely bonkers massive. It's not that the grass has been trodden down to a path; no there's a 6 lane highway with a rest area and a Cracker Barrel.
Re:Leaving MySQL by leetrout on Monday December 06, 2021 @10:38AM (#29461020)
LOL amazing metaphor.

The one thing that I've learned recently which surprised me- if you want to cluster MySQL (via partitioned tables or PlanetScale, etc) you cannot use foreign keys.

Some of the Postgres compatible tooling (Citus, Cockroach, etc) appears to support foreign keys across partitions / shards.

I was quite surprised to see this. Makes sense that not allowing FKs makes the data easier to shard but I never imagined that would be a thing you would have to contend with.

Re:Leaving MySQL by aarondf on Monday December 06, 2021 @10:41AM (#29461068)
I also ran into this recently when looking at SingleStore! I was surprised when they told me I couldn't use foreign keys, and was even more surprised that they were surprised that I do use foreign keys. They acted like I was the only one. And to be fair, given their clientele, I might be the only one!
Re:Leaving MySQL by js4ever on Monday December 06, 2021 @02:06PM (#29464150)
At "scale" you just can't afford to use FK, it's indeed slowing down everything and preventing good and fast clustering / replication. For some use cases you just have to live with it
Re:Leaving MySQL by aarondf on Monday December 06, 2021 @02:23PM (#29464352)
Yup for sure, that's what they were saying. It makes sense, but I was still surprised by it. I've never had to manage something at this scale before, so it was news to me.

For reference, we're at about 250 million rows, so not even proper "scale" scale!

Re:Leaving MySQL by vvern on Wednesday December 08, 2021 @09:02AM (#29484762)
citus has some rather severe limitations around foreign keys. Namely, you can’t use them from any distributed tables. See https://docs.citusdata.com/en/v10.2/develop/reference_ddl.ht...