-
Notifications
You must be signed in to change notification settings - Fork 879
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
Slow Query for the Indexable_Post_Indexation_Action->get_query() method #16645
Comments
Just to expand on this - we at WordPress VIP have seen 4-5 instances so far of our customers having 503's that we could trace back to slow queries originating from this indexables table queries. These customers have hundred's of thousands of posts, and the use of a |
@ovidiul thanks for the report. I've discussed this issue with the architects and they're happy to review a PR if you're willing to make one. |
Pull request submitted @Djennez |
#16645 fixing the posts indexation get_query method by adding a LEFT JOIN
Please give us a description of what happened.
One of our clients has a large set of posts, over 600K, and upon activating Yoast, the MySQL server seems to be filled with slow queries in the format of
Please describe what you expected to happen and why.
The average query time for that request is around 28 seconds, and this is considerably slowing down their backend.
Following my comment from here, I did look into an alternative solution and found that this LEFT JOIN query might be more helpful
Here is a comparison of the queries, the original one takes 28 sec to finish, while the LEFT JOIN one takes about 4 sec, the difference in numbers comes from the
wp yoast index
which runs in the background, I would guess that might benefit as well.Happy to make a PR if you consider this. Thanks
How can we reproduce this behavior?
Technical info
Used versions
The text was updated successfully, but these errors were encountered: