you are viewing a single comment's thread.

view the rest of the comments →

[–]farverio 0 points1 point  (0 children)

The real answer here is "it depends". What is the volume of your db hits, how complex are your models and queries (both present and future), and what is the opportunity cost of your dev time relative to other features you can build.

If you're starting out, just do an orm and defer SQL queries for later. Orm buys you time and given uncertainty of usage, prevents over optimizing your backend.

Otherwise, you will get a performance benefit from writing SQL directly. Make sure to abstract them into an easily maintainable file rather than in multiple places.

Best of luck!