r/programming • u/wheatBread • Aug 25 '26
Solving the 1+N Query Problem
https://acadia.engineering/blog/solving-the-1-plus-N-query-problem
127
Upvotes
r/programming • u/wheatBread • Aug 25 '26
View all comments
Show parent comment
13
u/ericl666 Aug 25 '26
Most ORMs have a solution (Spring Data has one of the worst I must say syntax wise).
If you use Hibernate, I highly recommend disabling lazy loading though. You can effortlessly add in N+1 queries without even noticing with lazy loading on.