The story
01
The problem
Cashiers said the tills felt slow. I read the production logs before suggesting anything.
02
What I found
- The database was not the problem: the median request took 17 ms.
- Cashiers really waited on card-terminal calls that could hang for the full 120-second timeout.
- A receipt search with no index read 570,000 orders to show 30.
- Every time a till opened, a 0.6-second scan went through 2.8 million rows.
03
What I did
- Ranked the fixes by cashier waiting time.
- The till-open fix measured 599 ms → 48 ms.
Result
A ranked fix list instead of a bigger server.