Query time 0.01558
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "83.87"
},
"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": "range",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"rows_examined_per_scan": 18,
"rows_produced_per_join": 0,
"filtered": "4.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`category_id` in (328,341,360,362,342,361,363,343,359,544,364,567,366,438,481,543,564,589))",
"cost_info": {
"read_cost": "12.54",
"eval_cost": "0.07",
"prefix_cost": "12.61",
"data_read_per_join": "2K"
},
"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": "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": 139,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "1.05",
"eval_cost": "13.97",
"prefix_cost": "27.63",
"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.92",
"eval_cost": "0.70",
"prefix_cost": "76.51",
"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.75",
"eval_cost": "0.70",
"prefix_cost": "78.96",
"data_read_per_join": "167"
},
"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.70",
"prefix_cost": "81.40",
"data_read_per_join": "223"
},
"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.77",
"eval_cost": "0.70",
"prefix_cost": "83.87",
"data_read_per_join": "31K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 3342 |
BlueStorm SFTP Cat6 305m Outdoor Network Cables |
Delivard Store |
P |
0 |
| 1566 |
Huawei eKitEngine S380-S8P2T |
Delivard Store |
P |
0 |
| 5925 |
MIKROTIK RB1100AHx4 |
Delivard Store |
P |
0 |
| 5196 |
Ubiquiti UNIFI CLOUD UCK-G2-SSD |
Delivard Store |
P |
0 |
| 5670 |
MIKROTIK ADAPTER 18POW |
Delivard Store |
P |
0 |
| 3938 |
TP-Link Archer AX10, AX1500 Wi-Fi 6 Router |
Delivard Store |
P |
0 |
| 3341 |
BlueStorm SFTP Cat6 305M Indoor Network Cable |
Delivard Store |
P |
0 |
| 3345 |
BlueStorm SFTP Cat5E 305m Outdoor Network Cable |
Delivard Store |
P |
0 |
| 4833 |
Ubiquiti ROCKET M2 |
Delivard Store |
P |
0 |
| 3340 |
BlueStorm SFTP Cat7 305M Outdoor Network Cable |
Delivard Store |
P |
0 |
| 3344 |
BlueStorm SFTP Cat5E 305M Indoor Network Cables |
Delivard Store |
P |
0 |
| 3339 |
BlueStorm UTP Cat6A 305m Indoor Network Cable |
Delivard Store |
P |
0 |
| 3347 |
BlueStorm S/FTP Cat6A 305m Outdoor Network Cable |
Delivard Store |
P |
0 |
| 4752 |
Ubiquiti EDGE SWITCH -24PORT-250W |
Delivard Store |
P |
0 |
| 5250 |
Ubiquiti USW-PRO-24-POE-EU |
Delivard Store |
P |
0 |
| 5919 |
MIKROTIK CRS106-1C-5S |
Delivard Store |
P |
0 |
| 5817 |
MIKROTIK CCR2116-12G-4S PLUS |
Delivard Store |
P |
0 |
| 5923 |
MIKROTIK POWER BOX PRO |
Delivard Store |
P |
0 |
| 5936 |
MIKROTIK FLEX-GUIDE ACRPSMA |
Delivard Store |
P |
0 |
| 5837 |
MIKROTIK CRS309-1G-8S+IN |
Delivard Store |
P |
0 |
| 1580 |
Huawei eKitEngine S380-S8T2T Multi-Service Gateway |
Delivard Store |
P |
0 |
| 5190 |
Ubiquiti ROCKET R5AC-Lite |
Delivard Store |
P |
0 |
| 5253 |
Ubiquiti USW-Ultra-210W |
Delivard Store |
P |
0 |
| 5843 |
MIKROTIK RBcAPGi-5acD2nD |
Delivard Store |
P |
0 |