logoalt Hacker News

JodieBeniteztoday at 10:04 AM1 replyview on HN

> BEGS you to cause n+1 problems

select_related, prefetch_related. n+1 problems be gone.


Replies

DarkNova6today at 10:11 AM

You misunderstand. And that is exactly the problem.

We did do that and that's why our queries ended up being several lines long. But if you missed just one model? You openly walk a knife again.

It's a mess and it only gets longer and longer. I ended the project with having some proper aggregates, only for that to be thrown out of the window by the guy after me.

show 1 reply