"Back"

SQL Explain

Executed SQL
SELECT `count_table`.`category_id`, COUNT(DISTINCT count_table.product_id) AS `product_count` 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_category_product_index` AS `count_table` ON count_table.product_id = e.entity_id WHERE (count_table.store_id = 1) AND (count_table.category_id IN ('129', '130', '131')) AND (count_table.is_parent = 1) GROUP BY `count_table`.`category_id`
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE count_table range PRIMARY,IDX_CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY,15D3C269665C74C2219037D534F4B0DC 15D3C269665C74C2219037D534F4B0DC 6 3 Using where; Using index
1 SIMPLE 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.count_table.product_id,const,const 1 Using index
1 SIMPLE cat_index eq_ref PRIMARY,IDX_CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY,15D3C269665C74C2219037D534F4B0DC PRIMARY 10 const,lalacurio_magn.count_table.product_id,const 1 Using where
1 SIMPLE e eq_ref PRIMARY PRIMARY 4 lalacurio_magn.count_table.product_id 1 Using index