News for hackers. Stuff that matters.
Re:ORMs don’t kill databases. Developers do. by clarkevans on Tuesday August 30, 2011 @08:24AM (#2941095)
The typical use of ORMs that kills the database is where one uses record-based operations to traverse a set: resulting in one query per record.

The blogger's point is quite good: a developer probably doesn't know what SQL is being generated, it may be opaque how small variants in query source can result in radically different SQL based on the translation process. Hence, a profiler should be used to find problematic queries. This is solid advice.

What's not mentioned though is that sometimes what appears to be very ugly SQL actually out-performs pretty, parsimonious, hand-crafted SQL. This, assuming the developer could actually craft correct SQL equivalent.

There are no comments on this comment yet.