DEV Community

Discussion on: ORM vs Pure SQL: Which to Choose?

Collapse
 
webbureaucrat profile image
webbureaucrat

The trouble is I've never met an application that didn't require at least a little SQL query optimization. The risk of producing extremely long-running queries is very high with ORMs. We're not talking about rare corner cases here.

Collapse
 
marmariadev profile image
Maria M.

You're right that ORMs can lead to inefficient queries. It's key to use profiling tools to identify and optimize these. Modern ORMs allow custom SQL for specific needs, balancing ease and control.

Collapse
 
mi_native_nutt profile image
Mark

The key is to know what you're doing. And know your tool. You don't need to profile. I've been using them for decades