Query time 0.00567
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "70.98"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "companies",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.00",
"eval_cost": "0.10",
"prefix_cost": "0.00",
"data_read_per_join": "3K"
},
"used_columns": [
"category_id",
"storefront_id",
"usergroup_ids",
"status"
]
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 139,
"rows_produced_per_join": 139,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.11",
"eval_cost": "13.90",
"prefix_cost": "15.01",
"data_read_per_join": "2K"
},
"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": 6,
"filtered": "5.00",
"cost_info": {
"read_cost": "34.75",
"eval_cost": "0.70",
"prefix_cost": "63.66",
"data_read_per_join": "30K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`products`.`parent_product_id` = 0) and (`softwarepirmam_hewadelivard_cscart_4`.`products`.`company_id` = 1) 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": 6,
"filtered": "99.93",
"cost_info": {
"read_cost": "1.74",
"eval_cost": "0.69",
"prefix_cost": "66.10",
"data_read_per_join": "166"
},
"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": 6,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.74",
"eval_cost": "0.69",
"prefix_cost": "68.53",
"data_read_per_join": "222"
},
"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": 6,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.76",
"eval_cost": "0.69",
"prefix_cost": "70.98",
"data_read_per_join": "31K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 2603 |
JBL T305C Wired earphone Type C |
Delivard Store |
P |
0 |
| 3136 |
Anker Soundcore Q20i Headphone |
Delivard Store |
P |
0 |
| 2587 |
JBL Tune 110 Earphones |
Delivard Store |
P |
0 |
| 2761 |
JBL Live 670NC |
Delivard Store |
P |
0 |
| 2694 |
JBL Tune 520BT Headphone |
Delivard Store |
P |
0 |
| 3096 |
Anker Soundcore H30i |
Delivard Store |
P |
0 |
| 2723 |
JBL Tune 720BT Headphone |
Delivard Store |
P |
0 |
| 2742 |
JBL Tune 770NC Headphone |
Delivard Store |
P |
0 |
| 3556 |
Belkin Soundform Surround Wireless Headphones |
Delivard Store |
P |
0 |
| 2593 |
JBL T310C Wired earphone Type C |
Delivard Store |
P |
0 |
| 3104 |
Anker Soundcore Space One Headphone |
Delivard Store |
P |
0 |
| 2618 |
JBL Tune 125BT Bluetooth |
Delivard Store |
P |
0 |
| 2828 |
Anker Soundcore Life Q30 |
Delivard Store |
P |
0 |
| 2613 |
JBL Jr310 Kids on-ear Headphones |
Delivard Store |
P |
0 |
| 2619 |
Anker Soundcore Space One Pro Foldable Over-Ear Headphones |
Delivard Store |
P |
0 |
| 2872 |
JBL Tune 710BT Headphone |
Delivard Store |
P |
0 |
| 2704 |
JBL Jr310BT |
Delivard Store |
P |
0 |
| 3593 |
Belkin Soundform Isolate Noise Cancelling Headphones |
Delivard Store |
P |
0 |
| 4888 |
Marshall Major V Headphones |
Delivard Store |
P |
0 |
| 3423 |
JBL Tune 215BT |
Delivard Store |
P |
0 |
| 5168 |
Philips On-ear wireless Headphones Black |
Delivard Store |
P |
0 |
| 2739 |
JBL JR470 Noise Cancelling Kids Headphones |
Delivard Store |
P |
0 |
| 3291 |
BELKIN IN-EAR PINK |
Delivard Store |
P |
0 |
| 5155 |
Philips Over-ear Headphones 5,000 Series |
Delivard Store |
P |
0 |
| 2841 |
Anker Soundcore Space Q45 |
Delivard Store |
P |
0 |
| 3876 |
Belkin Headphones With Lighting Connector |
Delivard Store |
P |
0 |
| 2561 |
Anker Soundcore Life U2 Bluetooth Neckband Headphones |
Delivard Store |
P |
0 |
| 3812 |
Belkin Headphones With USB-C Connector |
Delivard Store |
P |
0 |
| 5124 |
Philips Wired Headphones Type-C |
Delivard Store |
P |
0 |
| 2865 |
JBL Live 660NC Headphone |
Delivard Store |
P |
0 |
| 2734 |
Anker Soundcore life note U2i |
Delivard Store |
P |
0 |
| 3369 |
Belkin SOUNDFORM SURROUND HEADPHONES, BLUE |
Delivard Store |
P |
0 |
| 3139 |
Anker Soundcore Q10i Black |
Delivard Store |
P |
0 |
| 5157 |
Philips Over-ear Headphones 4,000 Series |
Delivard Store |
P |
0 |
| 2700 |
JBL Endurance Run BT Wireless In-Ear Sport Headphones Black |
Delivard Store |
P |
0 |
| 5121 |
Philips Wired Headphones Type-C |
Delivard Store |
P |
0 |
| 5929 |
Apple Earpods with (USB-C) Connector |
Delivard Store |
P |
0 |
| 2701 |
JBL In Ear, IPX5, Bluetooth headphone with play/pause and volume control |
Delivard Store |
P |
0 |
| 2797 |
JBL Tour One M2 Headphone Black |
Delivard Store |
P |
0 |
| 6271 |
Dyson OnTrac Headphones |
Delivard Store |
P |
0 |
| 5938 |
Apple Earpods (3.5mm Headphone Plug) |
Delivard Store |
P |
0 |
| 4886 |
Marshall Monitor III A.N.C. Over-Ear Bluetooth Headphones - Black |
Delivard Store |
P |
0 |
| 4885 |
Marshall Monitor II A.N.C. Wireless Bluetooth Headset - Black |
Delivard Store |
P |
0 |
| 8243 |
Hama 184068 Freedom Light Bluetooth True Wireless Earbuds – White |
Delivard Store |
P |
0 |
| 5933 |
Apple Earpods With Lightning Connector |
Delivard Store |
P |
0 |
| 8603 |
Hama 184105 In-Ear Earphones, Black, with USB-C Port |
Delivard Store |
P |
0 |
| 10022 |
Xiaomi Type-C Earphones |
Delivard Store |
P |
0 |
| 8272 |
Hama 184020 Connect Bluetooth Headphones In-Ear Micro Ear Hook, Black |
Delivard Store |
P |
0 |
| 7878 |
1HORA Wired Earphone Type-C – Black |
Delivard Store |
P |
0 |
| 8879 |
Marshall Major IV On-Ear Bluetooth Headphones - Black |
Delivard Store |
P |
0 |
| 7880 |
1HORA Headphone Black 919 (JH) – Over-Ear Wireless Headphones with Deep Bass |
Delivard Store |
P |
0 |
| 8458 |
Hama 184038 Advance Flat Ribbon In-Ear Earbuds with Microphone – White |
Delivard Store |
P |
0 |