3 ms·
>[...] ORMs are so controversial in part because they often obscure that you're doing something crazily ineffective ... Then just turn on detailed SQL logging
by gerbilly 8y ago
>[...] ORMs are so controversial in part because they often obscure that you're doing something crazily ineffective ...
Then just turn on detailed SQL logging while you are coding and keep an eye on the queries generated by your ORM calls.
If you do this methodically for all your DAOs, then you should spot performance problems early when they can still be easily fixed.
- saiya-jin 8y agoWith all this continuous effort required, wouldn't it be simply easier to ditch the whole 'use ORM because it makes life easier' nonsense and use just some SQL-mapping tool like iBatis? Where you really, truly have 100% immediate control over queries, no dancing around with logging and wasting time figuring out why the lib decided to fetch this and not that. I honestly don't get the fear some people have from SQL. If you can't do SQL good enough for 98% of use cases out there, you are not senior dev, not even experienced one. It's just one of those basic dev requirements that won't go away in next 50 years anyway.