2 ms·
Right. In fact any ORM worth its salt will have methods specifically designed to let you address the N+1 problem easily. E.G: django "select_related" Not to m
by BiteCode_dev 4y ago
Right. In fact any ORM worth its salt will have methods specifically designed to let you address the N+1 problem easily.
E.G: django "select_related"
Not to mention they will will have ways to use raw SQL through the lib infrastructure, which is still better than querying SQL manually, and give you full control of the query.
Also wordpress shows that you can write manual SQL and still have terrible performances because your application is badly structured, which an ORM helps with.
In the end, I don't think there is less trap with raw SQL, the traps are just different. It's not a matter of "better".