SpinTheMic
Pro

Interview practice question

Endpoint makes hundreds of queries

Backend Engineering · API Design · Intermediate

An endpoint listing 50 orders with their customers and items is slow. Logs show it runs 150 database queries. What is happening and how do you fix it?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • N+1 query problem.
  • Eager loading / joins.
  • Batch queries with IN.
  • DataLoader-style batching.
  • Check ORM settings.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics