In this article, we consider a solution using the SQL view to avoid query problem N+1 when calculating the average values in Ruby on Rails application.
Tutorial and link to GitHub are available at:
[https://jtway.co/how-to-avoid-n-1-query-using-sql-views-materialized-in-rails-application-7cf415cd112f](https://jtway.co/how-to-avoid-n-1-query-using-sql-views-materialized-in-rails-application-7cf415cd112f)
Very nice gem! Can’t believe I had never heard of it.
yeah this is definitely going to be looked