Heavy query slows down every backend site
-
Dear support
We are experience a very slow backend, no matter which site the backend user is loading.
After investigating we realized that the main cause is a very expensive query which takes at least 5x longer than the second slowest query, often even 10-20x longer (see query monitor plugin).
This query does seem unnecessary on almost all pages and is probably just needed on TI Wishlist backend pages.
The Query:SELECT SUM(
count
) asstats_count
FROM (SELECT COUNT(B
.ID
) AScount
FROMwp_tinvwl_analytics
ASA
LEFT JOINwp_tinvwl_items
ASC
ONC
.wishlist_id
=A
.wishlist_id
ANDC
.product_id
=A
.product_id
ANDC
.variation_id
=A
.variation_id
LEFT JOINwp_tinvwl_lists
ASB
ONC
.wishlist_id
=B
.ID
LEFT JOINwp_tinvwl_lists
ASG
ONC
.wishlist_id
=G
.ID
ANDG
.author
= 0
WHEREA
.product_id
> 0
GROUP BYA
.product_id
,A
.variation_id
HAVINGcount
> 0
LIMIT 0, 9999999) ASA
Caller:TInvWL_Public_AddToWishlist->set_wishlists_data_cookies()
Plugin:ti-woocommerce-wishlist-premium
Can you please fix the code so that queries are only triggered when really needed?
Thanks!The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.