3 ms·
(in between compiles...) Raw SQL for simple stuff, of course - easier to debug, transportable to multiple languages. For non-trivial stuff... For read-write
by asah 9y ago
(in between compiles...)
Raw SQL for simple stuff, of course - easier to debug, transportable to multiple languages.
For non-trivial stuff...
For read-write access, no choice but ORM imho - are you really gonna create stored procedures for every type of update?
For read-only access, raw SQL is an option, but it gets tricky with layers of VIEWs. Must be at least as powerful as Postgres e.g. partial and function indices to hide the underlying physical structure without paying some horrendous performance penalty.
(experience from trying to avoid ORMs in 3 startups... someday I'd love to add SELECT * MINUS <columns> to PostgreSQL to make VIEW authoring more scalable...)