-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix N + 1 for Refinery::Blog::Post.live #502
Comments
Hi @lanzhiheng ! Could you provide a pull request? |
@bricesanchez I am sorry that I forgot, I will provide a pull request later. 😢 |
@bricesanchez Each post's record will need the translation data. so If I avoid the N + 1 query by using I think It is so hard to review by developer. May be the N + 1 version (just using |
Normally I expect joins to produce only a single query; what's the peformance difference you're seeing? |
I am not very sure which is better. In my opinion, I expect joins too. 😿 Can you discuss it with @bricesanchez . |
Version: refinerycms-blog (4.0.0)
I encounter the N + 1 query when using
Refinery::Blog::Post.live
Look's good if using
Refinery::Blog::Post.includes(:translations).live
The text was updated successfully, but these errors were encountered: