Query time 0.02446
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "29.45"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "cscart_categories",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 6,
"rows_produced_per_join": 0,
"filtered": "4.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`category_id` in (424,450,451,452,426,492))",
"cost_info": {
"read_cost": "4.19",
"eval_cost": "0.02",
"prefix_cost": "4.21",
"data_read_per_join": "769"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
],
"attached_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` in ('A','H')) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`storefront_id` in (0,1)))"
}
},
{
"table": {
"table_name": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 10,
"rows_produced_per_join": 0,
"filtered": "10.00",
"using_join_buffer": "hash join",
"cost_info": {
"read_cost": "1.46",
"eval_cost": "0.02",
"prefix_cost": "5.70",
"data_read_per_join": "1K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.cscart_categories.category_id"
],
"rows_examined_per_scan": 194,
"rows_produced_per_join": 46,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "0.35",
"eval_cost": "4.66",
"prefix_cost": "10.70",
"data_read_per_join": "744"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status",
"idx_parent_product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "11.64",
"eval_cost": "0.23",
"prefix_cost": "27.00",
"data_read_per_join": "10K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`products`.`company_id` = `softwarepirmam_hewadelivard_cscart_4`.`companies`.`company_id`) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`parent_product_id` = 0) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`amount` > 0) or (`softwarepirmam_hewadelivard_cscart_4`.`products`.`tracking` = 'D')) and ((`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`products`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`product_type` <> 'D'))"
}
},
{
"table": {
"table_name": "prices",
"access_type": "ref",
"possible_keys": [
"usergroup",
"product_id",
"lower_limit",
"usergroup_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "99.93",
"cost_info": {
"read_cost": "0.58",
"eval_cost": "0.23",
"prefix_cost": "27.81",
"data_read_per_join": "55"
},
"used_columns": [
"product_id",
"lower_limit",
"usergroup_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`prices`.`lower_limit` = 1) and (`softwarepirmam_hewadelivard_cscart_4`.`prices`.`usergroup_id` in (0,0,1)))"
}
},
{
"table": {
"table_name": "popularity",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"total"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.58",
"eval_cost": "0.23",
"prefix_cost": "28.63",
"data_read_per_join": "74"
},
"used_columns": [
"product_id",
"total"
]
}
},
{
"table": {
"table_name": "descr1",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"product_id"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id",
"lang_code"
],
"key_length": "9",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.59",
"eval_cost": "0.23",
"prefix_cost": "29.45",
"data_read_per_join": "10K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 3878 |
BelkinCar Charger With 4 USB Black |
Delivard Store |
P |
0 |
| 3550 |
Belkin Cable USB-A To Lightning 1 M White |
Delivard Store |
P |
0 |
| 3515 |
Belkin BoostCharge 3-in-1 Magnetic Charging Stand with Qi2 Fast Wireless Charging 15W |
Delivard Store |
P |
0 |
| 3875 |
BELKIN CUBE-Wall Charger 45W PPS BK + 1m C-C Cable Black |
Delivard Store |
P |
0 |
| 2926 |
Anker 323 Car Charger 52.5W Black |
Delivard Store |
P |
0 |
| 3748 |
Belkin BOOSTCHARGE PRO 2-in-1 Wireless Charger Stand with MagSafe 15W |
Delivard Store |
P |
0 |
| 3128 |
Anker 20W Ultra Compact Phone & Tablet Charger Purple |
Delivard Store |
P |
0 |
| 2543 |
Anker USB-C Display Hub 4-in-1 4K Display, 10Gbps, 100W PD-IN Gray |
Delivard Store |
P |
0 |
| 3288 |
BELKIN 3.0 USB-C TO USB-A ADAPTER 5GBPS 1.5A Black |
Delivard Store |
P |
0 |
| 3410 |
Belkin 4-Port GaN Charger 108W |
Delivard Store |
P |
0 |
| 3599 |
Belkin USB-C GaN Universal Laptop Charger 100W |
Delivard Store |
P |
0 |
| 3035 |
Anker Prime 240W GaN Desktop Charger (4 Ports) Black |
Delivard Store |
P |
0 |
| 3220 |
Belkin BoostCharge USB-C to USB-C Braided Cable 240W PD, 48V/5A, 1M |
Delivard Store |
P |
0 |
| 3880 |
Belkin Magnetic Wireless Car Charger 10W |
Delivard Store |
P |
0 |
| 5107 |
Philips Cable Type-C to Type-C 65W 2m DLC4561CB |
Delivard Store |
P |
0 |
| 6112 |
Apple Thunderbolt 4 (USB-C) Pro Cable (1 m) |
Delivard Store |
P |
0 |
| 3043 |
Anker Car Charger 30W 2-Ports Black |
Delivard Store |
P |
0 |
| 2429 |
Anker Zolo USB-C to C Braided Cable 1M 240W |
Delivard Store |
P |
0 |
| 3805 |
Belkin Braided USB-C To USB-C Cable 1 M Black |
Delivard Store |
P |
0 |
| 3524 |
Belkin Belkin BOOST CHARGE Flex USB-C to USB-C Silicone Cable, 1M |
Delivard Store |
P |
0 |
| 2921 |
Anker PowerLine III Flow C to C Cable 100W 6ft White |
Delivard Store |
P |
0 |
| 3095 |
Anker Car Charger 2-Port USB 39W QC3.0 |
Delivard Store |
P |
0 |
| 3742 |
Belkin BOOST CHARGE Wireless Car Charger with Vent Mount 10W |
Delivard Store |
P |
0 |
| 3668 |
Baykron USB-A to Lightning Cable, MFI, Black |
Delivard Store |
P |
0 |