All jobs / Database administrator / Performance

Database administrator interview question · 1–3 years

Both code paths update the `accounts` and `ledger` tables; the errors cluster around payroll runs.

The application logs show deadlocks a few times a day. What do you do?

The strongest answer

Capture the deadlock graph, find the two code paths that lock the same rows in opposite orders, and fix the ordering or shorten the transactions; the app should also retry the victim

Why it works

Exactly — deadlocks are a design symptom; the graph names the culprits.

What a good answer covers

Answers that fall short

Who gets asked this

More Performance questions