hard20 pts · first answer countsdatabasesconcurrencyperformance
One counter row slows every sale
During a flash sale, every purchase updates one row: `UPDATE campaign SET sold = sold + 1 WHERE id = 7`. Throughput collapses with lock waits. What is a common fix?
Discussion 0
Join free to post in the discussion.
Related questions
- Slow email during signupBackend Developer
- Duplicate emails despite a checkBackend Developer
- What EXPLAIN tells youBackend Developer
- Asking for only a few fieldsBackend Developer
- Building a long string in a loopBackend Developer
- Building SQL from user inputBackend Developer
- What atomicity guaranteesBackend Developer
- WHERE column = NULL finds nothingBackend Developer