2 ms·
The hate against ORMs is mostly irrational but sadly self-sustaining at this point: I recently saw someone here honestly believe that the n+1 problem is unsolv
by eitland 6y ago
The hate against ORMs is mostly irrational but sadly self-sustaining at this point:
I recently saw someone here honestly believe that the n+1 problem is unsolvable in major ORMs like Hibernate. That person seemed to be delighted to get a pointer to a solution, but way too often many just dismiss all explanations.
If you are still reading you might be a bit interested so here are some things some of you might find interesting (Disclaimer, this is mostly from a PHP/Java/.Net-background):
- When people like me and others choose ORMs it isn't because we don't know SQL, I for example knew SQL long before I touched an ORM.
- There is generally no problem to break out of the ORM if you really need to optimize a statement.
- But to be honest once you get rid of the (famous) n+1 situations ORMs are crazy fast. I think often some of them can be faster for a lot of people just like compilers started outsmarting more and more programmers lately.