Query time 0.00304
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "32.29"
},
"ordering_operation": {
"using_filesort": false,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"table": {
"table_name": "variation_group_products",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"idx_group_id"
],
"key": "idx_group_id",
"used_key_parts": [
"group_id"
],
"key_length": "3",
"rows_examined_per_scan": 33,
"rows_produced_per_join": 33,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (169,171,118,348,120,168,434,122,380,170,378,174))",
"cost_info": {
"read_cost": "14.56",
"eval_cost": "3.30",
"prefix_cost": "17.86",
"data_read_per_join": "528"
},
"used_columns": [
"product_id",
"group_id"
]
}
},
{
"table": {
"table_name": "products",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 5,
"filtered": "17.71",
"cost_info": {
"read_cost": "8.25",
"eval_cost": "0.58",
"prefix_cost": "29.41",
"data_read_per_join": "25K"
},
"used_columns": [
"product_id",
"product_type",
"status",
"company_id",
"amount",
"usergroup_ids",
"tracking",
"parent_product_id"
],
"attached_condition": "(((`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": "companies",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"company_id"
],
"key_length": "4",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products.company_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "10.00",
"cost_info": {
"read_cost": "1.46",
"eval_cost": "0.06",
"prefix_cost": "31.46",
"data_read_per_join": "3K"
},
"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": "pt",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.variation_group_products.product_id"
],
"rows_examined_per_scan": 2,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.29",
"eval_cost": "0.12",
"prefix_cost": "31.86",
"data_read_per_join": "18"
},
"used_columns": [
"product_id",
"category_id"
]
}
},
{
"table": {
"table_name": "cscart_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"c_status",
"p_category_id"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.products_categories.category_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "5.00",
"cost_info": {
"read_cost": "0.29",
"eval_cost": "0.01",
"prefix_cost": "32.27",
"data_read_per_join": "187"
},
"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": "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.variation_group_products.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.01",
"eval_cost": "0.01",
"prefix_cost": "32.29",
"data_read_per_join": "273"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
amount |
product |
company_name |
variation_group_id |
product_type |
parent_product_id |
| 1600 |
100 |
Anker MagGo Power Bank (10K, 35W, For Apple Watch) |
Delivard Store |
118 |
P |
0 |
| 1601 |
100 |
Anker MagGo Power Bank (10K, 35W, For Apple Watch) |
Delivard Store |
118 |
V |
1600 |
| 1609 |
100 |
Anker Zolo Magnetic Power Bank (10K,30W,Built-in USB-C Cable) |
Delivard Store |
120 |
P |
0 |
| 1610 |
100 |
Anker Zolo Magnetic Power Bank (10K,30W,Built-in USB-C Cable) |
Delivard Store |
120 |
V |
1609 |
| 1615 |
100 |
Anker Prime Power Bank 20K mAh 200W |
Delivard Store |
122 |
P |
0 |
| 1616 |
100 |
Anker Prime Power Bank 20K mAh 200W |
Delivard Store |
122 |
V |
1615 |
| 2305 |
100 |
Xiaomi Redmi Power Bank 10,000mAh |
Delivard Store |
168 |
V |
2304 |
| 2304 |
100 |
Xiaomi Redmi Power Bank 10,000mAh |
Delivard Store |
168 |
P |
0 |
| 2314 |
100 |
Anker 533 10000mAh 30W Power Bank with Built-in USB-C Cable |
Delivard Store |
169 |
V |
2310 |
| 2312 |
100 |
Anker 533 10000mAh 30W Power Bank with Built-in USB-C Cable |
Delivard Store |
169 |
V |
2310 |
| 2310 |
100 |
Anker 533 10000mAh 30W Power Bank with Built-in USB-C Cable |
Delivard Store |
169 |
P |
0 |
| 2330 |
100 |
Anker 533 Power Bank 10K mAh 25W Black |
Delivard Store |
170 |
V |
2315 |
| 2329 |
100 |
Anker 533 Power Bank 10K mAh 25W Black |
Delivard Store |
170 |
V |
2315 |
| 2315 |
100 |
Anker 533 Power Bank 10K mAh 25W Black |
Delivard Store |
170 |
P |
0 |
| 2333 |
100 |
Anker 322 MagGo Power Bank 5000 mAh with stand |
Delivard Store |
171 |
P |
0 |
| 2351 |
100 |
Anker 533 Power Bank 10K mAh 30W |
Delivard Store |
174 |
P |
0 |
| 2350 |
100 |
Anker 533 Power Bank 10K mAh 30W |
Delivard Store |
174 |
V |
2351 |
| 3131 |
100 |
Anker Power Bank 10K 30W Built-In USB-C Cable |
Delivard Store |
348 |
P |
0 |
| 3132 |
100 |
Anker Power Bank 10K 30W Built-In USB-C Cable |
Delivard Store |
348 |
V |
3131 |
| 3133 |
100 |
Anker Power Bank 10K 30W Built-In USB-C Cable |
Delivard Store |
348 |
V |
3131 |
| 3361 |
100 |
Dviced Ultrathin Power Bank 10000mAh |
Delivard Store |
378 |
P |
0 |
| 3362 |
100 |
Dviced Ultrathin Power Bank 10000mAh |
Delivard Store |
378 |
V |
3361 |
| 3609 |
100 |
Belkin Power Bank 20K 30W with Integrated Cable |
Delivard Store |
380 |
V |
3370 |
| 3370 |
100 |
Belkin Power Bank 20K 30W with Integrated Cable |
Delivard Store |
380 |
P |
0 |
| 3371 |
100 |
Belkin Power Bank 20K 30W with Integrated Cable |
Delivard Store |
380 |
V |
3370 |
| 3836 |
100 |
Belkin Power Bank 10K with Integrated Cable |
Delivard Store |
434 |
P |
0 |
| 3839 |
100 |
Belkin Power Bank 10K with Integrated Cable |
Delivard Store |
434 |
V |
3836 |
| 3838 |
100 |
Belkin Power Bank 10K with Integrated Cable |
Delivard Store |
434 |
V |
3836 |
| 3837 |
100 |
Belkin Power Bank 10K with Integrated Cable |
Delivard Store |
434 |
V |
3836 |