We've had the case where a seemingly small change in a query (such as adding a .join()
clause) actually caused us a large load-related headache when run multiple times by our users in production. To avoid this issue in future iterations we now use (rack-mini-profiler)[https://github.com/MiniProfiler/rack-mini-profiler] to help us measure our queries in development! The profiler will give you a file-by-file, query-by-query analysis of your page load times and flag expensive queries.