Query time 0.00360
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "27.10"
},
"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": 28,
"rows_produced_per_join": 28,
"filtered": "100.00",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`variation_group_products`.`group_id` in (815,176,531,160,773,352,162,317,770))",
"cost_info": {
"read_cost": "12.06",
"eval_cost": "2.80",
"prefix_cost": "14.86",
"data_read_per_join": "448"
},
"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": 4,
"filtered": "17.71",
"cost_info": {
"read_cost": "7.00",
"eval_cost": "0.50",
"prefix_cost": "24.66",
"data_read_per_join": "21K"
},
"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.24",
"eval_cost": "0.05",
"prefix_cost": "26.40",
"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": 0,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "26.74",
"data_read_per_join": "15"
},
"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.25",
"eval_cost": "0.00",
"prefix_cost": "27.09",
"data_read_per_join": "159"
},
"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.00",
"prefix_cost": "27.10",
"data_read_per_join": "231"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
amount |
product |
company_name |
variation_group_id |
product_type |
parent_product_id |
| 2262 |
100 |
Xiaomi Redmi Buds 6 Pro |
Delivard Store |
160 |
V |
2252 |
| 2261 |
100 |
Xiaomi Redmi Buds 6 Pro |
Delivard Store |
160 |
V |
2252 |
| 2252 |
100 |
Xiaomi Redmi Buds 6 Pro |
Delivard Store |
160 |
P |
0 |
| 2267 |
100 |
Xiaomi Redmi Buds 6 lite |
Delivard Store |
162 |
V |
2254 |
| 2266 |
100 |
Xiaomi Redmi Buds 6 lite |
Delivard Store |
162 |
V |
2254 |
| 2254 |
100 |
Xiaomi Redmi Buds 6 lite |
Delivard Store |
162 |
P |
0 |
| 2369 |
100 |
Xiaomi Sound outdoor S29D 30W |
Delivard Store |
176 |
P |
0 |
| 2370 |
100 |
Xiaomi Sound outdoor S29D 30W |
Delivard Store |
176 |
V |
2369 |
| 2371 |
100 |
Xiaomi Sound outdoor S29D 30W |
Delivard Store |
176 |
V |
2369 |
| 3016 |
100 |
Huawei FreeClip |
Delivard Store |
317 |
P |
0 |
| 3017 |
100 |
Huawei FreeClip |
Delivard Store |
317 |
V |
3016 |
| 3018 |
100 |
Huawei FreeClip |
Delivard Store |
317 |
V |
3016 |
| 3019 |
100 |
Huawei FreeClip |
Delivard Store |
317 |
V |
3016 |
| 3150 |
100 |
Anker Zolo C to C Cable 6ft 240W |
Delivard Store |
352 |
P |
0 |
| 3151 |
100 |
Anker Zolo C to C Cable 6ft 240W |
Delivard Store |
352 |
V |
3150 |
| 4614 |
100 |
ADATA UV240 USB 2.0 Flash Drive - 64GB |
Delivard Store |
531 |
P |
0 |
| 4615 |
100 |
ADATA UV240 USB 2.0 Flash Drive - 64GB |
Delivard Store |
531 |
V |
4614 |
| 7285 |
100 |
Hisense A6500N Series 4K UHD Smart LED TV 75" |
Delivard Store |
770 |
P |
0 |
| 7620 |
100 |
Hisense A6500N Series 4K UHD Smart LED TV 43" |
Delivard Store |
770 |
P |
0 |
| 7619 |
100 |
Hisense A6500N Series 4K UHD Smart LED TV 65" |
Delivard Store |
770 |
P |
0 |
| 7618 |
100 |
Hisense A6500N Series 4K UHD Smart LED TV 55" |
Delivard Store |
770 |
P |
0 |
| 7617 |
100 |
Hisense A6500N Series 4K UHD Smart LED TV 50" |
Delivard Store |
770 |
P |
0 |
| 7293 |
100 |
Hisense A4Q Series FHD Smart LED TV 43" |
Delivard Store |
773 |
P |
0 |
| 7625 |
100 |
Hisense A4Q Series FHD Smart LED TV 32" |
Delivard Store |
773 |
P |
0 |
| 2459 |
100 |
Xiaomi TV A 2025 65" |
Delivard Store |
815 |
P |
0 |
| 8492 |
100 |
Xiaomi TV A 2025 50" |
Delivard Store |
815 |
P |
0 |
| 8491 |
100 |
Xiaomi TV A 2025 43" |
Delivard Store |
815 |
P |
0 |
| 8493 |
100 |
Xiaomi TV A 2025 55" |
Delivard Store |
815 |
P |
0 |