3 ms·
pulling in a bunch of rows and reducing them in Ruby [...] Not only is it wasteful and slower, in my experience it's also more error prone. Yeah. A l
by JohnBooty 3y ago
pulling in a bunch of rows and reducing them in Ruby [...]
Not only is it wasteful and slower, in my experience
it's also more error prone.
Yeah. A lot of problems happen for one of two reasons. The application developers don't wrap the whole thing in a transaction, and open themselves up to consistency problems. Or they do wrap a bunch of database round trips up in a transaction and open themselves up to contention issues, deadlocks, etc.
In both cases, those problems generally never show up in local or test environments. Only in prod... under load.