Slow Query

This area is devoted to Multiple Wishlists. Please ask questions, report bugs and share ideas here.

Slow Query

Postby tstoffel » Tue Apr 15, 2014 6:00 pm

These queries are extremely slow for customers with many items in their mwishlist and cause up to 45 second delays while loading:

SELECT Count(*)
FROM `wishlist_item` AS `main_table`
WHERE ( wishlist_id = '3' )
AND ( main_table.store_id IN( '1' ) )
AND ( main_table.product_id = (SELECT iproduct_status_table.entity_id
FROM catalog_product_entity_int AS
iproduct_status_table USE INDEX (idx_mage_catalog_product_entity_int_entity_id)
WHERE iproduct_status_table.entity_id =
main_table.product_id
AND (
iproduct_status_table.store_id = 1
OR iproduct_status_table.store_id = 0 )
AND
iproduct_status_table.attribute_id = 96
AND
iproduct_status_table.entity_type_id = 4
AND iproduct_status_table.value = 1
ORDER BY iproduct_status_table.store_id
DESC
LIMIT 1) );

SELECT `main_table`.*
FROM `wishlist_item` AS `main_table`
WHERE ( wishlist_id = '3' )
AND ( main_table.store_id IN( '1' ) )
AND ( main_table.product_id = (SELECT iproduct_status_table.entity_id
FROM catalog_product_entity_int AS
iproduct_status_table USE INDEX (idx_mage_catalog_product_entity_int_entity_id)
WHERE iproduct_status_table.entity_id =
main_table.product_id
AND (
iproduct_status_table.store_id = 1
OR iproduct_status_table.store_id = 0 )
AND
iproduct_status_table.attribute_id = 96
AND
iproduct_status_table.entity_type_id = 4
AND iproduct_status_table.value = 1
ORDER BY iproduct_status_table.store_id
DESC
LIMIT 1) );


Since these do not exist in any of the Magento core files, I can only assume that they are hidden in your obfuscated/encrypted/compiled php. These queries are poorly devised and need to be changed to use an index on the subquery as I have highlighted in RED above. Can you please correct this and/or provide and unencrypted version of the files in question? Thank you.
tstoffel
 
Posts: 4
Joined: Tue Apr 15, 2014 5:02 am

Re: Slow Query

Postby IToris team » Wed Apr 16, 2014 5:31 pm

Hi tstoffel,

We have optimized the extension (v1.1.14). Please update it at System -> IToris Extensions -> IToris Installer.
If you need the open source version your license should be upgraded to Premium. Please contact support@itoris.com for the upgrade.

Best regards,
ITORIS team
IToris team
Site Admin
 
Posts: 1686
Joined: Mon Jan 19, 2009 12:33 pm

Re: Slow Query

Postby tstoffel » Thu Apr 17, 2014 7:48 pm

Much better. Thank you for the quick resolution.
tstoffel
 
Posts: 4
Joined: Tue Apr 15, 2014 5:02 am


Return to Multiple Wishlists

Who is online

Users browsing this forum: No registered users and 0 guests

cron