The queries running for the posts for all records vs only for the paginated ones
-
Hello,
We are facing challenges with the site load time and while debugging we identified the Yoast SEO plugins is running queries without considering the paginated results.
We have 100000+ records in the post table and while reviewing the queries using the Query Monitor plugin, we saw queries ran like:
SELECT wp_posts.* FROM wp_posts WHERE ID IN (all records for the selected tab)
We have a limit of 100 records to display on the page so not sure why the queries ran by the plugin selects all of the data for the posts that are in the specific tab and by tab I mean (Trashed/Mine/All/Published)
Just to give clarity on this, if the Trashed tab has 10000 records, the query selects all 10000 vs just selecting the 100 records on that page.
Similarly, when I try to go the All tab and as you can see in the screenshot I have 118000+ records, the select query tries to fetch all records in one query.
FYI: We have the latest plugin v15.0 installed on the site.
I hope this makes sense. Please let me know if there is a setting somewhere that I can update to solve this issue or piece of code that I can add to my theme etc.
Looking forward to a positive response.
Thank you
Malek
- The topic ‘The queries running for the posts for all records vs only for the paginated ones’ is closed to new replies.