You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have one question though, that could be more of a philosophical question.
In this application I am recommending a product (which exists in a table within the database) based the results of a "quiz" that the user takes (also exists within the database). Within the user's dashboard there could be 30, 40 or even more quizzes; all requiring the name of the recommended product to be visible. The catch is, I am not referring to these products by a foreign key. I am building a search query based on the results that the user inputs during the quiz. See below:
Is there a way to cut down on my database queries using scopes, eager loading, or whatever, to retrieve the related product without having to query my database for every single quiz? My initial thought was no, but after seeing/hearing your talk I am now wondering if my initial thought was incorrect.
The text was updated successfully, but these errors were encountered:
I have one question though, that could be more of a philosophical question.
In this application I am recommending a product (which exists in a table within the database) based the results of a "quiz" that the user takes (also exists within the database). Within the user's dashboard there could be 30, 40 or even more quizzes; all requiring the name of the recommended product to be visible. The catch is, I am not referring to these products by a foreign key. I am building a search query based on the results that the user inputs during the quiz. See below:
Is there a way to cut down on my database queries using scopes, eager loading, or whatever, to retrieve the related product without having to query my database for every single quiz? My initial thought was no, but after seeing/hearing your talk I am now wondering if my initial thought was incorrect.
The text was updated successfully, but these errors were encountered: