PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

Critical SQL Load Issue Possibly Caused by Husky Product Filter – Urgent Help Needed

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Hi there,

I’m experiencing a critical issue on my website that appears to be caused by the Husky Product Filter plugin. My hosting provider has flagged an SQL query with extreme load coming from the site and has warned that if the issue isn’t resolved quickly, they may take the website offline.

Here’s the SQL query they’ve identified (triggered by the plugin, most likely during product filtering):

 

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
LEFT JOIN wp_term_relationships AS tt1 ON (wp_posts.ID = tt1.object_id)
LEFT JOIN wp_term_relationships AS tt2 ON (wp_posts.ID = tt2.object_id)
LEFT JOIN wp_term_relationships AS tt3 ON (wp_posts.ID = tt3.object_id)
LEFT JOIN wp_term_relationships AS tt4 ON (wp_posts.ID = tt4.object_id)
LEFT JOIN wp_term_relationships AS tt5 ON (wp_posts.ID = tt5.object_id)
LEFT JOIN wp_term_relationships AS tt6 ON (wp_posts.ID = tt6.object_id)
LEFT JOIN wp_term_relationships AS tt7 ON (wp_posts.ID = tt7.object_id)
LEFT JOIN wp_term_relationships AS tt8 ON (wp_posts.ID = tt8.object_id)
LEFT JOIN wp_term_relationships AS tt9 ON (wp_posts.ID = tt9.object_id)
LEFT JOIN wp_term_relationships AS tt10 ON (wp_posts.ID = tt10.object_id)
LEFT JOIN wp_term_relationships AS tt11 ON (wp_posts.ID = tt11.object_id)
LEFT JOIN wp_term_relationships AS tt12 ON (wp_posts.ID = tt12.object_id)
LEFT JOIN wp_term_relationships AS tt13 ON (wp_posts.ID = tt13.object_id)
LEFT JOIN wp_term_relationships AS tt14 ON (wp_posts.ID = tt14.object_id)
LEFT JOIN wp_term_relationships AS tt15 ON (wp_posts.ID = tt15.object_id)
WHERE 1=1 AND (
wp_posts.ID NOT IN (
SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (7,9)
)
AND wp_posts.ID NOT IN (
SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (9)
)
AND (
wp_term_relationships.term_taxonomy_id IN (213,144)
AND tt1.term_taxonomy_id IN (1340,1094)
AND tt2.term_taxonomy_id IN (1323,256)
AND tt3.term_taxonomy_id IN (1766,132)
AND tt4.term_taxonomy_id IN (1353)
AND tt5.term_taxonomy_id IN (1363,1360)
AND tt6.term_taxonomy_id IN (168,410)
AND tt7.term_taxonomy_id IN (1364)
)
AND tt8.term_taxonomy_id IN (1340,1094)
AND tt9.term_taxonomy_id IN (213,144)
AND tt10.term_taxonomy_id IN (1323,256)
AND tt11.term_taxonomy_id IN (1364)
AND tt12.term_taxonomy_id IN (1766,132)
AND tt13.term_taxonomy_id IN (1363,1360)
AND tt14.term_taxonomy_id IN (1353)
AND tt15.term_taxonomy_id IN (168,410)
)
AND (
wp_posts.post_type = 'product' AND (
wp_posts.post_status = 'publish' OR
wp_posts.post_status = 'ywgc-disabled' OR
wp_posts.post_status = 'ywgc-dismissed' OR
wp_posts.post_status = 'ywgc-code-not-valid' OR
wp_posts.post_status = 'acf-disabled'
)
)
AND (
wp_posts.ID IN (
SELECT product_or_parent_id FROM (
SELECT product_or_parent_id
FROM wp_wc_product_attributes_lookup lt
WHERE term_id in (167) AND in_stock = 1
) temp
)
)
GROUP BY wp_posts.ID
ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
LIMIT 0, 36

 

 

This query is taking over 115 seconds to execute and causes heavy load on a shared hosting server (confirmed by my provider). I believe this is a bug or an unintended behavior in the filtering logic.

I urgently need a fix or a workaround from your side — either an optimization to the query or a plugin update. Otherwise, my host may suspend the site temporarily, which I really want to avoid.

Let me know how to proceed.

Thanks,

Nick

Hello Nick

I'm not sure if this request is related to my plugin. My plugin does not create this type of requests

What plugin version number are you using?

Do you have the by_instock filter activated?  If yes, just disable it for the test