Ask questionsLogo image queries with meta_value slowing down database
<!-- Please use this template when creating an issue.
Constant slow queries requesting post_id of an image attachment from the database. On our small server this is slowing down page loads to an excess of 10 seconds. The image requested always seems to be the same one (logo) image.
SELECT post_id FROM wp_postmeta WHERE meta_key = '_wp_attached_file' AND meta_value = 'same-logo-image.png'
This may have some similarity to issue #10195 however unfortunately I am still seeing a similar issue with version 11.2.1. As this was apparently resolved by caching the results to some of these queries, I checked the wpseo_social row in our database and image_id wasn't being set in any case. I tried to set the fields manually but this didn't stop the queries.
As we are only using a small server for this website we have had to disable Wordpress SEO entirely as the page loads were in excess of 10 seconds. Furthermore disabling the Opengraph parts didn't seem to help.
Efficient queries with page loads similar speed without plugin. Caching of in-efficient queries.
<!-- You can check these boxes once you've created the issue.
<!-- You can check these boxes once you've created the issue. -->
Answer questions raptor235
I'm still seeing this issue with premium 12.3 version...
query monitor is reporting the slow query