"Back"

SQL Explain

{{{Executed SQL}}{{Executed SQL}}{{Executed SQL}}{{Mage_Core}}}
SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '2' INNER JOIN `catalog_product_link` AS `links` ON links.linked_product_id = e.entity_id AND links.link_type_id = 1 WHERE (e.entity_id NOT IN((SELECT `sales_flat_quote_item`.`product_id` FROM `sales_flat_quote_item` WHERE (quote_id = '')))) AND (links.product_id = 508) AND (`e`.`entity_id` != '508')
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY links ref UNQ_CAT_PRD_LNK_LNK_TYPE_ID_PRD_ID_LNKED_PRD_ID,IDX_CATALOG_PRODUCT_LINK_PRODUCT_ID,IDX_CATALOG_PRODUCT_LINK_LINKED_PRODUCT_ID,IDX_CATALOG_PRODUCT_LINK_LINK_TYPE_ID IDX_CATALOG_PRODUCT_LINK_PRODUCT_ID 4 const 1 Using where
1 PRIMARY price_index eq_ref PRIMARY,IDX_CATALOG_PRODUCT_INDEX_PRICE_CUSTOMER_GROUP_ID,IDX_CATALOG_PRODUCT_INDEX_PRICE_WEBSITE_ID,IDX_CAT_PRD_IDX_PRICE_WS_ID_CSTR_GROUP_ID_MIN_PRICE PRIMARY 8 lalacurio_magn.links.linked_product_id,const,const 1 Using index
1 PRIMARY cat_index eq_ref PRIMARY,IDX_CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY,15D3C269665C74C2219037D534F4B0DC PRIMARY 10 const,lalacurio_magn.links.linked_product_id,const 1 Using where
1 PRIMARY e eq_ref PRIMARY PRIMARY 4 lalacurio_magn.links.linked_product_id 1 Using index
2 DEPENDENT SUBQUERY sales_flat_quote_item ref IDX_SALES_FLAT_QUOTE_ITEM_PRODUCT_ID,IDX_SALES_FLAT_QUOTE_ITEM_QUOTE_ID IDX_SALES_FLAT_QUOTE_ITEM_QUOTE_ID 4 const 1 Using where