3 ms·
> 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 a
by crazygringo 4y ago
> 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.
- rad_gruchalski 4y agoYou can join like that with YugabyteDB. But it would be good to get intimate with explain analyze.