4 ms·
So I agree, premature optimization can often not be necessary. But let's be crazy for a minute. How much CPU/RAM/disk IO does that query on normalized tables
by sixdimensional 10y ago
So I agree, premature optimization can often not be necessary.
But let's be crazy for a minute. How much CPU/RAM/disk IO does that query on normalized tables end up using? How much electricity does that query use?
Maybe from a pure efficiency perspective, it takes less energy to query the pre-computed value, than to constantly be recalculating it on every query.
- quickben 10y agoCraziness comes later. Usually few years after several developers added not normalized tables, and it all grew organically with multiple apps depending on the data. When it comes to rdbms shema, you want it optimized and enforced from day one, or the price paid later will be significant.