When to denormalize: signs your normalized schema is causing problems
Sarah Andersen
·316 views
we're dealing with a service that has a heavily normalized postgresql schema, and it's starting to cause significant performance headaches. a common user profile page requires joining across 7 different tables, and this read path is hit hundreds of times per second. the caching strategy for this page is also becoming incredibly complex because a change in any of those 7 tables means we have to invalidate the cache. i'm seeing signs that denormalization might be the way to go for this specific use case. what are the clear signals you look for that indicate your normalized schema is actively harming performance and maintainability, and that denormalizing certain read paths is justified? how do you then manage the consistency aspects of denormalized data?
3 comments