News for hackers. Stuff that matters.
Re:DenoDB by wolframhempel on Friday June 18, 2021 @02:24AM (#27547864)
I couldn't agree more. ORMs might be an ok choice to get started quickly and to maintain a consistent way of working across teams, but over time they very frequently become a bottleneck. Having a handwritten, optimized SQL with specific joins and subqueries, tailored to the exact problem - or even better yet, a pre-planned query or postgres function is often orders of magnitudes more efficient and can make a substantial difference in terms of response times and running costs for your db servers.
Re:DenoDB by tester34 on Friday June 18, 2021 @02:42AM (#27547946)
Why not both?

Approach where you use pure SQL for reads and ORM for saves is not that uncommon

Re:DenoDB by wolframhempel on Friday June 18, 2021 @03:05AM (#27548046)
That's fair - though I feel that ORM enthusiasts would advocate for the consistency that comes with the ORM on read, the automated resolution of relationships and the mapping to an object in the native language.