"Back"

SQL Explain

{{{Executed SQL}}{{Executed SQL}}{{Executed SQL}}{{Mage_Core}}}
SELECT `main`.`value_id`, `main`.`value` AS `file`, `main`.`entity_id` AS `product_id`, `value`.`label`, `value`.`position`, `value`.`disabled`, `default_value`.`label` AS `label_default`, `default_value`.`position` AS `position_default`, `default_value`.`disabled` AS `disabled_default` FROM `catalog_product_entity_media_gallery` AS `main` LEFT JOIN `catalog_product_entity_media_gallery_value` AS `value` ON main.value_id = value.value_id AND value.store_id = 1 LEFT JOIN `catalog_product_entity_media_gallery_value` AS `default_value` ON main.value_id = default_value.value_id AND default_value.store_id = 0 WHERE (main.attribute_id = '88') AND (main.entity_id in ('367')) ORDER BY IF(value.position IS NULL, default_value.position, value.position) ASC
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE main ref IDX_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_ATTRIBUTE_ID,IDX_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_ENTITY_ID IDX_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_ENTITY_ID 4 const 1 Using where; Using temporary; Using filesort
1 SIMPLE value eq_ref PRIMARY,IDX_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_STORE_ID PRIMARY 6 lalacurio_magn.main.value_id,const 1
1 SIMPLE default_value eq_ref PRIMARY,IDX_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_STORE_ID PRIMARY 6 lalacurio_magn.main.value_id,const 1