SpinTheMic
Pro

Interview practice question

ORM can't express a query efficiently

Backend Engineering · Relational Databases · Experienced

Your ORM generates a very inefficient query for a complex report, and tuning it within the ORM is painful. What would you do?

What a strong answer covers

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

  • Use raw SQL for that query.
  • Keep it parameterised and tested.
  • Encapsulate in repository method.
  • Map results to DTOs.
  • ORM for simple CRUD, SQL for complex reads.
Practise this topic

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

See all topics