🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Relationships and Transactions: all 10 questions

Quiz: Relationships and Transactions · Question 1 of 10

Listing 50 enrolments runs 1 query for the enrolments and 50 more for their courses. What is this called?

Listing 50 enrolments runs 1 query for the enrolments and 50 more for their courses. What is this called?

  1. A.A deadlock
  2. B.The N+1 problem
  3. C.Dirty checking
  4. D.An optimistic lock
Answer & explanation

Correct answer: The N+1 problem

Fix it with JOIN FETCH or an entity graph.

Can you get the rest right without peeking?

Take the timed Quiz: Relationships and Transactions quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →