How to Write Efficient Active Record Queries
|Added at||2016-12-21 01:12|
I am relatively new to ActiveRecord, which I use alongside Sinatra. Currently, I am building small scale websites. I have not run into any issues with queries taking too long, but I want to know how to optimize searches best, so my site is scalable.
This is something I have been wondering for awhile. Does ActiveRecord treat a query that is broken down into multiple functions different from one that is just one function?
This is more of a conceptual question: how does ActiveRecord run searches? Do more functions added make searches less efficient? When you have a query that is broken down into multiple functions