Hacker News new | ask | show | jobs
by pg314 3480 days ago
That is not my experience. I have seen it countless times that people use an ORM in a way that leads to horribly inefficient queries behind the scene (e.g. looping over a result of a query and then executing a query for each of the result, where both could be combined in one). Things that should take milliseconds were taking hours...

It's also not enough to know SQL. You also need to know how your ORM maps objects to the database. E.g. do you get the same object if you execute a query twice? A surprising number of people don't know, and assume that ORM objects behave like normal objects and that is not always the case.

1 comments

I think it's probably very dependent on the language and ecosystem you find yourself in when you need to approach this aspect of software engineering. It's probably much easier for someone learning to program and using Rails to let ActiveRecord be what you learn, and let it build your schema, and learn the minimum to make that work. Like all tools, shallow learning leads to misunderstanding, inefficiencies and mistakes.