Weird SQL query slowing the server
-
Hi all
I’m running Ubuntu 16.04 on a VPS, WordPress 5.4 french uptodate, mysql 5.7.29, PHP 7.0.33, Woocommerce & all plugins up to date. Everything was OK until several weeks ago. I’m not sure this is due to PWB but there is a query coming back constantly in our mysql process list in “sending data” status, and slowering the server in general, with a mention of PWB-BRAND :
SELECT mb_posts.ID FROM mb_posts INNER JOIN mb_ postmeta ON ( mb_posts.ID = mb_postmeta.post_id ) WHERE 1=1 AND (
EXISTS (
SELECT 1
FROM mb_term_relationships
INNER JOIN mb_term_taxonomy
ON mb_term_taxonomy.term_taxonomy_id = mb_term_relationships.term_taxonomy_id
WHERE mb_term_taxonomy.taxonomy = pwb-brand
AND mb_term_relationships.object_id = mb_posts.ID
)
) AND (
( mb_postmeta.meta_key = ‘_stock_status’ AND mb_postmeta.meta_value NOT IN (‘outofstock’) )
) AND mb_posts.post_type = ‘product’ AND (mb_posts.post_status = ‘publish’ OR mb_posts.post_status = ‘wc-lpc_transit’ OR mb_ posts.post_status = ‘wc-lpc_delivered’ OR mb_posts.post_status = ‘wc-lpc_anomaly’ OR mb_posts.post_status = ‘wc-lpc_ready_to _ship’) GROUP BY mb_posts.ID ORDER BY mb_posts.post_date DESC—
Any clue what could cause the problem ? the user sending the query is root on localhost so I fear we are being targeted somehow…
Thank you for your readingH.S.
- The topic ‘Weird SQL query slowing the server’ is closed to new replies.