Imagify Causing Slow Down Across All wp-admin – Slow Query
-
Wondered why this wp-admin was running so slow, installed query monitor and saw that imagify is running up 15-20 seconds per page load in wp-admin…
SELECT?COUNT( p.ID )
FROM?wp_posts?AS?p
INNER?JOIN?wp_postmeta?AS?imrwpmt1
ON?( p.ID = imrwpmt1.post_id
AND?imrwpmt1.meta_key = ‘_wp_attached_file’
AND?p.post_mime_type?IN?( ‘image/jpeg’,’image/png’,’image/gif’,’image/webp’,’application/pdf’ )
AND?p.post_type = ‘attachment’
AND?p.post_status?IN?( ‘inherit’,’private’ ) )
INNER?JOIN?wp_postmeta?AS?imrwpmt2
ON?( p.ID = imrwpmt2.post_id
AND?imrwpmt2.meta_key = ‘_wp_attachment_metadata’ )
WHERE?p.post_mime_type?IN?( ‘image/jpeg’,’image/png’,’image/gif’,’image/webp’,’application/pdf’ )
AND?p.post_type = ‘attachment’
AND?p.post_status?IN?( ‘inherit’,’private’ )
AND?imrwpmt1.meta_value?NOT?LIKE?‘%://%’
AND?imrwpmt1.meta_value?NOT?LIKE?‘_:\\\%’
AND?REVERSE (LOWER( imrwpmt1.meta_value ))?REGEXP?‘^gpj\..*|^gepj\..*|^epj\..*|^gnp\..*|^fig\..*|^pbew\..*|^fdp\..*’
- You must be logged in to reply to this topic.