I'm working on a Magento webshop (EE with terrible performance on pages where product attributes are loaded, the worst performing page is the product page because there're multiple attributes shown. It takes 12854ms and 250MB memory to load!

I've installed the AOE Profiler extension for better profiling where I saw the following:

enter image description here

When I disable all the local and community modules and restore the default or rwd theme I've got the same performance (there are no core hacks).

The shown queries are all the same and the complete version of it:

    `main_table`.*, `tdv`.`value` AS `default_value`, `tsv`.`value` AS `store_default_value`, IF(tsv.value_id > 0, tsv.value, tdv.value) AS `value` 
    `eav_attribute_option` AS `main_table`
    `eav_attribute_option_value` AS `tdv` 
    tdv.option_id = main_table.option_id
    `eav_attribute_option_value` AS `tsv` 
    tsv.option_id = main_table.option_id AND tsv.store_id = '1' 
    (tdv.store_id = 0) 
    main_table.sort_order ASC, value ASC

When I run this query I get 11000 records! All attribute option values. The webshop does have a lot of attribute option values, but why get all these instead of getting the ones needed? For example the attributes.phtml file, this one renders on this product page just 6 attributes. As you can see, the query runs 6 times! It looks like it's getting everything (the collection, correct me if I'm wrong) and filters afterwards.

Is this a bug in Magento or something I can fix easily?

  • See astrio.net/blog/… - curious to know if that's an issue. I thought we patched this.
    – benmarks
    Sep 3 '15 at 3:25
  • Thanks for your reply, meanwhile we've opened a support ticket and a core developer at Magento created a hotfix, he replaced the app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Table.php file with the same file from a older version of Magento. We're now waiting for a nice fix.
    – Roy
    Sep 3 '15 at 9:34

We've contacted Magento Enterprise support and they've created a patch for this: SUPEE-6913. I can't reference to anything because I've just received the patch by email.

  • I cant find this patch online..
    – SWD
    Mar 30 '19 at 12:16
  • was this patch helpful in resolving the issue mentioned ?
    – sodhancha
    Aug 2 at 3:29
  • It fixed it but it's most likely fixed in the next release. It was specific to EE
    – Roy
    Aug 3 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.