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
The check for author_has_public_posts_wp performs a potentially slow query on larger sites. Related to #20110.
Is your feature request related to a problem? Please describe.
On a site with ~1.6 million posts, the query to check for public posts is slow. This query can occur whenever an index is not present and any list page is loaded.
In this site, the query took almost 3s (even in a dedicated local environment).
SELECTwp_posts.IDFROM wp_posts
WHERE1=1ANDwp_posts.post_authorIN (26062)
ANDwp_posts.post_type='post'AND ((wp_posts.post_status='publish'))
ORDER BY wp_posts.post_dateDESCLIMIT0, 1
Describe the solution you'd like
I'm not sure if the ORDER BY is necessary in the above query if we're just checking for the existence of a public post. If not, we can remove that from the query.
Additionally, I wanted to double check that this query is run on CRON when enable_cron_indexing is enabled.
Why do you think this feature is something we should consider for the Yoast SEO plugins?
This query significantly impacts load times on larger sites and can easily be optimized.
Thank you for creating this issue and bringing it to our attention. We truly value feedback from our users, as it helps us identify areas for improvement.
I have escalated this issue internally to our development team for further investigation. They will review it thoroughly to ensure we address the concern effectively.
We’ll keep you updated on the progress and resolution. In the meantime, please don’t hesitate to share any additional details or suggestions you might have.
The check for
author_has_public_posts_wp
performs a potentially slow query on larger sites. Related to #20110.Is your feature request related to a problem? Please describe.
On a site with ~1.6 million posts, the query to check for public posts is slow. This query can occur whenever an index is not present and any list page is loaded.
In this site, the query took almost 3s (even in a dedicated local environment).
Describe the solution you'd like
I'm not sure if the
ORDER BY
is necessary in the above query if we're just checking for the existence of a public post. If not, we can remove that from the query.Additionally, I wanted to double check that this query is run on CRON when
enable_cron_indexing
is enabled.Why do you think this feature is something we should consider for the Yoast SEO plugins?
This query significantly impacts load times on larger sites and can easily be optimized.
Additional context
Discovered during the WooCommerce performance spike.
The text was updated successfully, but these errors were encountered: