3 ms·
>"DB will do similar things" Not really as the storage data layout and application data layout are different. If I were to use database only relying on it's ca
by FpUser 4y ago
>"DB will do similar things"
Not really as the storage data layout and application data layout are different. If I were to use database only relying on it's caching abilities it would lead to complex queries that are definitely way less performant than getting data from in memory structures optimized for this particular application / usage patterns.
On top of that some requests require some relatively complex calculations that again are executed against optimized in memory layout and would suffer greatly if done against the database.
I did some experiments and the difference was very significant.
- winrid 4y agoSure, I definitely don't know what you're doing. Usually I would reach for preaggregation here, computing the values on write, but I don't know anything about the use case so... :)