Query time 0.02804
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "321.34"
},
"ordering_operation": {
"using_filesort": true,
"grouping_operation": {
"using_temporary_table": true,
"using_filesort": false,
"nested_loop": [
{
"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": "companies",
"access_type": "ALL",
"possible_keys": [
"PRIMARY"
],
"rows_examined_per_scan": 10,
"rows_produced_per_join": 1,
"filtered": "10.00",
"cost_info": {
"read_cost": "1.46",
"eval_cost": "0.10",
"prefix_cost": "1.56",
"data_read_per_join": "6K"
},
"used_columns": [
"company_id",
"status",
"company"
],
"attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`companies`.`status` = 'A')"
}
},
{
"table": {
"table_name": "var_val_657",
"access_type": "ref",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "fl",
"used_key_parts": [
"feature_id",
"lang_code",
"variant_id"
],
"key_length": "12",
"ref": [
"const",
"const",
"const"
],
"rows_examined_per_scan": 290,
"rows_produced_per_join": 290,
"filtered": "100.00",
"cost_info": {
"read_cost": "72.50",
"eval_cost": "29.00",
"prefix_cost": "103.06",
"data_read_per_join": "224K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`var_val_657`.`product_id` is not null)"
}
},
{
"table": {
"table_name": "products_categories",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"pt"
],
"key": "PRIMARY",
"used_key_parts": [
"category_id",
"product_id"
],
"key_length": "6",
"ref": [
"const",
"softwarepirmam_hewadelivard_cscart_4.var_val_657.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 290,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "72.50",
"eval_cost": "29.00",
"prefix_cost": "204.56",
"data_read_per_join": "4K"
},
"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.var_val_657.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "5.00",
"cost_info": {
"read_cost": "72.50",
"eval_cost": "1.45",
"prefix_cost": "306.06",
"data_read_per_join": "64K"
},
"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.var_val_657.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "99.93",
"cost_info": {
"read_cost": "3.63",
"eval_cost": "1.45",
"prefix_cost": "311.14",
"data_read_per_join": "347"
},
"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.var_val_657.product_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "100.00",
"cost_info": {
"read_cost": "3.62",
"eval_cost": "1.45",
"prefix_cost": "316.21",
"data_read_per_join": "463"
},
"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.var_val_657.product_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 14,
"filtered": "100.00",
"cost_info": {
"read_cost": "3.68",
"eval_cost": "1.45",
"prefix_cost": "321.34",
"data_read_per_join": "66K"
},
"used_columns": [
"product_id",
"lang_code",
"product"
]
}
}
]
}
}
}
}
Result
| product_id |
product |
company_name |
product_type |
parent_product_id |
| 11108 |
Ray-Ban Thalia 53mm |
Delivard Store |
P |
0 |
| 11297 |
Ray-Ban Marshal 54mm |
Delivard Store |
P |
0 |
| 11529 |
Ray-Ban Chris 54mm |
Delivard Store |
P |
0 |
| 11230 |
Ray-Ban RB3680D 60mm |
Delivard Store |
P |
0 |
| 11292 |
Ray-Ban RB4232 57mm |
Delivard Store |
P |
0 |
| 11366 |
Ray-Ban ANH Bio-Based 66mm |
Delivard Store |
P |
0 |
| 11343 |
Ray-Ban Balorama 62mm |
Delivard Store |
P |
0 |
| 11394 |
Ray-Ban Wayfarer Reverse 53mm |
Delivard Store |
P |
0 |
| 11493 |
Ray-Ban RB3724D 59mm |
Delivard Store |
P |
0 |
| 11370 |
Ray-Ban Bain Bridge 57mm |
Delivard Store |
P |
0 |
| 11406 |
Ray-Ban Aviator Titanium 62mm |
Delivard Store |
P |
0 |
| 11469 |
Ray-Ban Old Aviator 58mm |
Delivard Store |
P |
0 |
| 11592 |
Ray-Ban RB3754 60mm |
Delivard Store |
P |
0 |
| 11089 |
Ray-Ban RB2180 51mm |
Delivard Store |
P |
0 |
| 11123 |
Ray-Ban RB2203 55mm |
Delivard Store |
P |
0 |
| 11434 |
Ray-Ban RB3749 58mm |
Delivard Store |
P |
0 |
| 11490 |
Ray-Ban RB3721 59mm |
Delivard Store |
P |
0 |
| 11006 |
Ray-Ban Daddy-O 59mm |
Delivard Store |
P |
0 |
| 11017 |
Ray-Ban Square 1971 Classic 54mm |
Delivard Store |
P |
0 |
| 11263 |
Ray-Ban Round Flat Lenses 53mm |
Delivard Store |
P |
0 |
| 11336 |
Ray-Ban RB3588 55mm |
Delivard Store |
P |
0 |
| 11505 |
Ray-Ban RB3751 61mm |
Delivard Store |
P |
0 |
| 11517 |
Ray-Ban RB3947 54mm |
Delivard Store |
P |
0 |
| 11110 |
Ray-Ban Elliot 52mm |
Delivard Store |
P |
0 |