3 ms·
while ORMs can do quite a bit of optimization, they're still general query builders and can't construct the optimal queries for your use case. if you don't know
by failedxyz 9y ago
while ORMs can do quite a bit of optimization, they're still general query builders and can't construct the optimal queries for your use case. if you don't know SQL, or you don't know what's going on behind the scenes, your ORM could be performing much larger queries than it really needs to, costing performance and time
- stouset 9y agoBut that's a completely orthogonal problem — the point made (way) above is that you need to understand SQL whether or not you use an ORM.
- gjjrfcbugxbhf 9y agoMost ORMs have way too write raw SQL. Furthermore someone using an ORM well will understand how their queries are mapping to SQL. Your scenario happens with people that either don't know or don't care. They will write crappy queries with any tool.
- collyw 9y agoSounds about right. I built a moderately complex application in Django at a previous workplace, using the ORM for most things, until the queries were too complex for the ORM. Another guy connected to the same database and built some graphs using PHP and SQL. Guess who had to help him write the SQL when the queries got too complex for him? The ORM user.