Re:EdgeDB is now Gel and Postgres is the future
by dvtkrlbs on Wednesday February 26, 2025 @07:08AM
(#43182920)
In my experience it is the exact reverse. You spend weeks configuring or tuning your orm calls when you ccould just spend a few hours optimizing your sql. There is a reason most orms has a raw SQL escape hatch.
The sweet spot is typesafe sql libraries. You write your raw sql and library deduces the return type from the database and gives you typesafety (sqlx is really good for this, sqlc for go is similar). It gives you almost all the benefits of ORMs with almost no downsides.
Or you spend 5 minutes actually putting some effort in to configuring your ORM. Maybe spend 30 minutes learning if it's your first time. People will spend weeks handwriting SQL to save hours of ORM tuning.