3 ms·
In reading that, my first thought was "why in the world would Uber do that?" In every single performance tuning a scale story that I've read over the past deca
by brightball 10y ago
In reading that, my first thought was "why in the world would Uber do that?"
In every single performance tuning a scale story that I've read over the past decade, the very first point of order is: remove joins from high traffic queries. It seems like Uber has gone the complete opposite direction.
- gdulli 10y agoYou can shape yourself to fit a problem or you can shape a problem to fit you. Wisdom is knowing when to do which.
- emn13 10y agoIt's unrealistic to remove all joins (usually), and most joins aren't very expensive. In normal cases a join is strictly faster than running an extra query to get that extra data. Joins start getting particularly tricky when you do expensive stuff like filter over the correlated results of many tables. But in those cases, there's also no easy alternative: you'll need to redesign the way you store your data, if possible.
- angelbob 10y agoSometimes this is very hard to do. This is in effect Twitter's core use case as well, with the list of accounts you follow. And it's a hard problem. Twitter spawned a huge wave of NoSQL to deal with this, and it's still not really dealt with.
- MustardTiger 10y agoBut that is largely incorrect advice, given based on the fact that mysql never implemented any reasonable join algorithms, just nested loops. It didn't apply to real databases.