The N+1 problem is JPA/Hibernate's quietest performance killer: load a list of N rows, then touch a lazy association and it fires one more query per row — 1 + N. Watch it happen, then fix it with JOIN FETCH, @EntityGraph, or batch fetching and see the count collapse.
WHERE id IN (…) chunks → 1 + ⌈N/5⌉. The killer detail: N+1 doesn't error or even look slow in dev with 5 rows — it quietly explodes in production.