Quiz

Transactions, Isolation & Denormalization Trade-offs

Test how transactions, isolation levels, and schema design decisions interact under concurrency.

An e-commerce order service runs a multi-statement transaction that debits inventory and inserts an order row. To boost read throughput, the team denormalizes a 'total_stock' counter into a summary table updated inside the same transaction. Under concurrent load, they observe lost updates on 'total_stock' at READ COMMITTED. Which change most directly and correctly fixes the lost-update problem while preserving correctness?