Learn Labs
3. Data Models and Query Languages

3.6 Production failure catalog for this chapter

Production failure catalog
0 rows
SymptomUnderlying modeling decision
Page makes 200 DB queries to render 50 rowsN+1, from an ORM or a GraphQL resolver without batching
Rename a company → 400,000 stale copies of the old logo URLDenormalized human-meaningful data with no update process
Two sources of the same relationship disagreeMany-to-many stored on both sides
Timeline shows a stale like count / old avatarFast-changing data was denormalized into a materialized view
One document is 14 MB and every read pulls all of itEmbedded a genuine one-to-many where the model only supports one-to-few
Migration locks the table and takes the site downSchema-on-write UPDATE rewriting every row
Read code full of if (!user.first_name) foreverSchema-on-read with no migration and no shape observability
Recursive SQL query never terminatesCycles in the graph; no visited-set, no depth bound
One graph query melts the clusterSupernode with millions of edges
Public API DoS'd by one clever queryGraphQL without depth/complexity limits
Rebuilt projection produces different numbersNon-deterministic event processing (external lookup, now())
Rebuild sends 200,000 confirmation emailsSide effects inside a replayable projection
Cannot honour a GDPR erasure requestImmutable multi-user event log; no crypto-shredding designed in
Analytics dashboard is wrong after a source renameSchema drift with schema-on-read semantics in the pipeline
Model works in training, garbage in productionOne-hot encoder not persisted — training/serving skew