When to denormalize: signs your normalized schema is causing problems
Lars Johansson
·15 views
we've got this core service at work where a single, common read path requires joining seven different tables. it's normalized to death, which made a lot of sense initially, but now it's a huge performance bottleneck. the queries are complex, the db load is high, and caching is a nightmare because any of those seven tables changing invalidates a potentially huge swath of cached data. we're starting to hit the point where denormalization seems like the only sensible path forward for this specific read pattern. what are the clearest signals you look for that scream 'denormalize this!'? how do you approach maintaining data consistency when you start duplicating data across tables or even services? i'm looking for practical advice on when to bite the bullet and how to manage the ensuing complexity.
17 comments