Query time 0.00310
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "93.44"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "product_id",
"used_key_parts": [
"product_id"
],
"key_length": "3",
"rows_examined_per_scan": 144,
"rows_produced_per_join": 46,
"filtered": "32.52",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (9460,9464,9489,9491,9492,9493,9495,9507,9509,9556,9579,9581,9583,9584,9586,9693,9760,9769,9803,9848,9855,9980,9985,9989))",
"cost_info": {
"read_cost": "66.13",
"eval_cost": "4.68",
"prefix_cost": "70.81",
"data_read_per_join": "36K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"value",
"value_int",
"lang_code"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`v`.`lang_code` = 'en') and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`feature_id` is not null))"
}
},
{
"table": {
"table_name": "f",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.v.feature_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "9.53",
"cost_info": {
"read_cost": "11.71",
"eval_cost": "0.45",
"prefix_cost": "87.20",
"data_read_per_join": "1K"
},
"used_columns": [
"feature_id",
"feature_type",
"categories_path",
"parent_id",
"display_on_catalog",
"status",
"position"
],
"attached_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`f`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`f`.`display_on_catalog` = 'Y') and ((`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path` = '') or (0 <> find_in_set(577,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(621,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(622,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`))) and (if(`softwarepirmam_hewadelivard_cscart_4`.`f`.`parent_id`,(/* select#2 */ select `softwarepirmam_hewadelivard_cscart_4`.`df`.`status` from `softwarepirmam_hewadelivard_cscart_4`.`cscart_product_features` `df` where (`softwarepirmam_hewadelivard_cscart_4`.`df`.`feature_id` = `softwarepirmam_hewadelivard_cscart_4`.`f`.`parent_id`)),'A') = 'A') and ((`softwarepirmam_hewadelivard_cscart_4`.`v`.`variant_id` <> 0) or ((`softwarepirmam_hewadelivard_cscart_4`.`f`.`feature_type` <> 'C') and (`softwarepirmam_hewadelivard_cscart_4`.`v`.`value` <> '')) or (`softwarepirmam_hewadelivard_cscart_4`.`f`.`feature_type` = 'C') or (`softwarepirmam_hewadelivard_cscart_4`.`v`.`value_int` <> 0)))",
"attached_subqueries": [
{
"dependent": true,
"cacheable": false,
"query_block": {
"select_id": 2,
"cost_info": {
"query_cost": "0.35"
},
"table": {
"table_name": "df",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "0.25",
"eval_cost": "0.10",
"prefix_cost": "0.35",
"data_read_per_join": "440"
},
"used_columns": [
"feature_id",
"status"
]
}
}
}
]
}
},
{
"table": {
"table_name": "fd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"lang_code"
],
"key_length": "9",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.v.feature_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.12",
"eval_cost": "0.45",
"prefix_cost": "88.76",
"data_read_per_join": "10K"
},
"used_columns": [
"feature_id",
"description",
"prefix",
"suffix",
"lang_code"
]
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.12",
"eval_cost": "0.45",
"prefix_cost": "90.32",
"data_read_per_join": "5K"
},
"used_columns": [
"variant_id",
"position"
]
}
},
{
"table": {
"table_name": "vd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.fv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.12",
"eval_cost": "0.45",
"prefix_cost": "91.88",
"data_read_per_join": "13K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "gf",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"softwarepirmam_hewadelivard_cscart_4.f.parent_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 4,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.12",
"eval_cost": "0.45",
"prefix_cost": "93.44",
"data_read_per_join": "1K"
},
"used_columns": [
"feature_id",
"feature_type",
"position"
],
"attached_condition": "<if>(is_not_null_compl(gf), (`softwarepirmam_hewadelivard_cscart_4`.`gf`.`feature_type` = 'G'), true)"
}
}
]
}
}
}
Result
| product_id |
feature_id |
value |
value_int |
variant_id |
feature_type |
description |
prefix |
suffix |
variant |
parent_id |
position |
gposition |
| 9509 |
657 |
|
|
9034 |
E |
Brand |
|
|
Dunhill |
0 |
0 |
|
| 9760 |
657 |
|
|
8978 |
E |
Brand |
|
|
Emmanuelle Jane |
0 |
0 |
|
| 9693 |
657 |
|
|
8616 |
E |
Brand |
|
|
Mercedes Benz |
0 |
0 |
|
| 9586 |
657 |
|
|
8616 |
E |
Brand |
|
|
Mercedes Benz |
0 |
0 |
|
| 9769 |
657 |
|
|
8989 |
E |
Brand |
|
|
Ferrari |
0 |
0 |
|
| 9584 |
657 |
|
|
8616 |
E |
Brand |
|
|
Mercedes Benz |
0 |
0 |
|
| 9583 |
657 |
|
|
8616 |
E |
Brand |
|
|
Mercedes Benz |
0 |
0 |
|
| 9803 |
657 |
|
|
8785 |
E |
Brand |
|
|
Gucci |
0 |
0 |
|
| 9581 |
657 |
|
|
8616 |
E |
Brand |
|
|
Mercedes Benz |
0 |
0 |
|
| 9579 |
657 |
|
|
8616 |
E |
Brand |
|
|
Mercedes Benz |
0 |
0 |
|
| 9848 |
657 |
|
|
8356 |
E |
Brand |
|
|
Hugo Boss |
0 |
0 |
|
| 9556 |
657 |
|
|
8980 |
E |
Brand |
|
|
Mont Blanc |
0 |
0 |
|
| 9855 |
657 |
|
|
8356 |
E |
Brand |
|
|
Hugo Boss |
0 |
0 |
|
| 9507 |
657 |
|
|
9034 |
E |
Brand |
|
|
Dunhill |
0 |
0 |
|
| 9985 |
657 |
|
|
8704 |
E |
Brand |
|
|
Lacoste |
0 |
0 |
|
| 9460 |
657 |
|
|
8980 |
E |
Brand |
|
|
Mont Blanc |
0 |
0 |
|
| 9464 |
657 |
|
|
8980 |
E |
Brand |
|
|
Mont Blanc |
0 |
0 |
|
| 9989 |
657 |
|
|
8704 |
E |
Brand |
|
|
Lacoste |
0 |
0 |
|
| 9489 |
657 |
|
|
8358 |
E |
Brand |
|
|
Dolce & Gabbana |
0 |
0 |
|
| 9491 |
657 |
|
|
8358 |
E |
Brand |
|
|
Dolce & Gabbana |
0 |
0 |
|
| 9492 |
657 |
|
|
8358 |
E |
Brand |
|
|
Dolce & Gabbana |
0 |
0 |
|
| 9493 |
657 |
|
|
8358 |
E |
Brand |
|
|
Dolce & Gabbana |
0 |
0 |
|
| 9980 |
657 |
|
|
8704 |
E |
Brand |
|
|
Lacoste |
0 |
0 |
|
| 9495 |
657 |
|
|
9034 |
E |
Brand |
|
|
Dunhill |
0 |
0 |
|
| 9803 |
682 |
|
|
8701 |
S |
Capacity |
|
|
90ml |
0 |
300 |
|
| 9980 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9855 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9769 |
682 |
|
|
8658 |
S |
Capacity |
|
|
125ml |
0 |
300 |
|
| 9985 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9848 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9760 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9989 |
682 |
|
|
8703 |
S |
Capacity |
|
|
50ml |
0 |
300 |
|
| 9693 |
682 |
|
|
8773 |
S |
Capacity |
|
|
120ml |
0 |
300 |
|
| 9586 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9584 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9583 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9581 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9579 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9556 |
682 |
|
|
8658 |
S |
Capacity |
|
|
125ml |
0 |
300 |
|
| 9509 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9507 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9495 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9493 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9492 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9491 |
682 |
|
|
8658 |
S |
Capacity |
|
|
125ml |
0 |
300 |
|
| 9489 |
682 |
|
|
8658 |
S |
Capacity |
|
|
125ml |
0 |
300 |
|
| 9464 |
682 |
|
|
8656 |
S |
Capacity |
|
|
100ml |
0 |
300 |
|
| 9460 |
682 |
|
|
8659 |
S |
Capacity |
|
|
75ml |
0 |
300 |
|