News for hackers. Stuff that matters.
Re:How does database sharding work? by crazygringo on Friday April 07, 2023 @11:00AM (#35482244)
> My intuition is that a properly sharded database will perform faster-or-same as a non-sharded one in all scenarios.

No, because as soon as you have to JOIN across shards performance plummets. I mean, you can't JOIN across shards so you have to simulate that client-side which is very slow.

The secret to performant manual sharding is to figure out a way to minimize JOINs across shards, and that the ones you have to do are very small. Or to start replicating data which quickly becomes its own nightmare of consistency.

Re:How does database sharding work? by rad_gruchalski on Saturday April 08, 2023 @07:43AM (#35492373)
You can join like that with YugabyteDB. But it would be good to get intimate with explain analyze.