Skip to content
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

When indexable creation is disabled, there's redundant db queries on page load, in the frontend of posts #21405

Closed
leonidasmi opened this issue May 23, 2024 · 0 comments · Fixed by #21442
Assignees

Comments

@leonidasmi
Copy link
Contributor

leonidasmi commented May 23, 2024

After #20335 is merged, the fixing of the disabling of indexable creation is going to have a side-effect:

  • Upon page load on a post, we're going to have a query that's going to be redundant and always do nothing, because of the fact that we don't have an indexable for that post (this happened only once before, because we were creating an indexable upon page load):
DELETE
FROM `wp_yoast_indexable_hierarchy`
WHERE `indexable_id` = NULL
  • We can probably return early before going into the clear_ancestors() function, to avoid that.
@leonidasmi leonidasmi changed the title When indexable creation is disabled, there's a couple of redundant db queries on page load, in the frontend of posts When indexable creation is disabled, there's redundant db queries on page load, in the frontend of posts May 23, 2024
@thijsoo thijsoo self-assigned this Jun 13, 2024
@thijsoo thijsoo removed their assignment Jun 14, 2024
@igorschoester igorschoester self-assigned this Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants