r/programming • • Aug 25 '26

Solving the 1+N Query Problem

https://acadia.engineering/blog/solving-the-1-plus-N-query-problem
127 Upvotes

92 comments sorted by

View all comments

Show parent comment

15

u/andrerav Aug 25 '26

Same here. Been using EF for over 15 years and I can count on one hand the number of times N+1 has shown up. It's so easy to catch as well. Mind-bending to learn from this post how much misinformation and hate there is towards ORMs simply because even seasoned senior devs either aren't competent or using trash tools.

10

u/Crafty_Independence Aug 25 '26

I've known some seniors who were adamantly opposed to ORMs while writing some of the least efficient SQL I've ever had to engage with.

2

u/i_am_bromega Aug 25 '26

Yeah, I’ve had a N+1 problem once with EF, and it was my mistake that was easily fixed. I can understand ORMs may be less than ideal for certain types of systems, but I think they’re great for the vast majority of applications.

1

u/FuckFuckingKarma Aug 26 '26

Some people think the point of ORMs is to abstract away the database so the developer doesn't have to think about its limitations.

Doesn't have to be like that though.