4 ms·
The question is: is ActiveRecord worse at query generation than other ORMs? My answer is no, it is not. In my experience ORMs are all pretty much equal at thi
by JohnBooty 4y ago
The question is: is ActiveRecord worse at query generation than other ORMs?
My answer is no, it is not.
In my experience ORMs are all pretty much equal at this. (However, I would love to be wrong!)
I don't know of any ORM that intelligently analyzes your database and comes up with highly optimized queries. I'm not sure such a thing is possible. The database's own query analyzer can optimize query execution because it has intimate knowledge of the database's own data structures, indexes, data cardinality, etc.
I accept ORMs as a necessary evil for most work. However, I enjoy ActiveRecord because unlike some ORMs it makes it fairly easy to simply use raw handwritten SQL when needed.