Sorry for the burn, but you managed to contradict yourself mid writting (or maybe you used an AI that messed up your point?)>Raw SQL is great for simple queries, but gets old quick when you are dealing with "higher order" parameterized queries (...)
>The sweet spot is an ORM that embraces dropping down into raw SQL where needed {...)
So basically you said that ORM are great only for the sweet spot of "mildy complex query". Because Raw SQL is great for simple query, and can be invoked when the ORM is not enough for highly complex query.
So I'd stick with my strategy of mastering raw SQL. I never felt the need of switching tool specifically for mildy difficult query. These are usually boring repetitive stuff than you can usually abstract away with a stored procedure (or in a external parametrized SQL script if your development guideline is to avoid storing any business logic in the database)
PS : But of course ORM is still very relevant if your application aim to be compatible with different database vendors and you are ok to never optimize query yourself directly beyond what your ORM vendor can provide.
4/30/2026
at
7:39:31 PM
Not a good look to accuse others of AI spam because you can't immediately grasp their point. Others clarified it well.ORM has substantial utility beyond just abstracting across different backends (I personally think that is one of the worst reasons to use an ORM, migrating or joining across entire production database systems is not something you ever take lightly).
> So I'd stick with my strategy of mastering raw SQL. I never felt the need of switching tool specifically for mildy difficult query.
FWIW this attitude reminds me of devs who insist Haskell or Emacs whatever is the one true technology that can do everything. Hard to work with. They build ivory towers, complicated systems that only the author can enter.
SQL is great but has its limits. Same for ORMs. Sweet spot is in the gray zone.
by pphysch