2 ms·
Broadly: Normalised data is more performant on write, because for each piece of state, there will be one and only one place to store it. It's less performant o
by jacques_chester 10y ago
Broadly: Normalised data is more performant on write, because for each piece of state, there will be one and only one place to store it.
It's less performant on read because you are constructing logical deductions out of a lattice of tiny pebbles of truth. It takes time to find, filter, sort and project those.
Denormalisation "works" by skipping to a read-optimised schema for those applications where reads greatly outnumber writes. Which is very many.
As an aside, "denormalised" doesn't have to mean "unstructured chaos". Do As Thou Wilt isn't necessarily the law of denormalising. There are well-studied, widely-used denormalisation techniques under the heading of "dimensional modelling".
It's just that most of these discussions are dominated by web folk, not data warehouse folk.
The shoutout to Event Sourcing is promising, given the interaction with the CQRS pattern. In short: read schema and write schema have different demand and performance characteristics. So split them up.
- LgWoodenBadger 10y agoI don't know that you can always conclude that normalized data is more performant for writes. Take for example the case where your normalized write consists of 5 insert statements into 5 tables, instead of 1 insert into 1 table that you'd do with a denormalized write.
- jacques_chester 10y agoAs always, consult your doctor, accountant, lawyer and profiler.