WorkCase study
Loan details API performance
I traced a slow loan details endpoint to an N+1 query problem and fixed it, so the endpoint responds far faster.
Completed
Context
An API endpoint that returns loan details.
The problem
The endpoint was slow because of an N+1 query problem: it made one database query to fetch a set of records, then one more query for each record in it.
What I did
I identified the N+1 pattern and changed how the endpoint loads its data, so it no longer issues a separate query per record.
Outcome
The endpoint's response time dropped substantially.