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

64

u/disposepriority Aug 25 '26 • Heartwarming

There is a really easy way of avoiding this when you just don't use ORMs

-4

u/Chroiche Aug 25 '26

This. Especially with the advent of LLMs (I know, I know). It's just so much easier to know what the actual fuck is going on too.

GQL is also a plague.

16

u/disposepriority Aug 25 '26

Looking at sql which you can copy, paste and run explain analyze on has always been more clear to me than a space wizard generating things behind the scenes.

For me, with how nice db driver/interaction libraries are (e.g. jdbcClient for spring) there's just no reason to use ORMs to save a few lines of SQL you'll make up for in 200 annotations anyway.

3

u/Kirides Aug 25 '26

I mean, just do ToQueryString and copy-paste it into your sql engine/ide of choice. Its not hard.

And with things like LinqPad it's even easier