Query time 0.00269
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "91.62"
},
"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": 141,
"rows_produced_per_join": 45,
"filtered": "32.52",
"index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`v`.`product_id` in (7159,7266,11313,7069,7157,6906,6929,7092,7133,7166,6935,7018,7072,7134,7139,7154,6930,6936,7115,7269,7162,6921,6934,6968))",
"cost_info": {
"read_cost": "64.88",
"eval_cost": "4.58",
"prefix_cost": "69.46",
"data_read_per_join": "35K"
},
"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.46",
"eval_cost": "0.44",
"prefix_cost": "85.51",
"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(558,`softwarepirmam_hewadelivard_cscart_4`.`f`.`categories_path`)) or (0 <> find_in_set(628,`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.09",
"eval_cost": "0.44",
"prefix_cost": "87.04",
"data_read_per_join": "9K"
},
"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.09",
"eval_cost": "0.44",
"prefix_cost": "88.56",
"data_read_per_join": "4K"
},
"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.09",
"eval_cost": "0.44",
"prefix_cost": "90.09",
"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.09",
"eval_cost": "0.44",
"prefix_cost": "91.62",
"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 |
| 7092 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 11313 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7269 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7266 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7166 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7162 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7159 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7157 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7154 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7139 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7134 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7133 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7115 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7072 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7069 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7018 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6934 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6906 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6921 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6929 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6930 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6935 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6968 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 6936 |
657 |
|
|
8355 |
E |
Brand |
|
|
Lego |
0 |
0 |
|
| 7157 |
765 |
|
|
8386 |
S |
Set |
|
|
Marvel |
0 |
0 |
|
| 6921 |
765 |
|
|
8374 |
S |
Set |
|
|
Technic |
0 |
0 |
|
| 7269 |
765 |
|
|
8477 |
S |
Set |
|
|
Speed Champions |
0 |
0 |
|
| 7069 |
765 |
|
|
8422 |
S |
Set |
|
|
Ninjago |
0 |
0 |
|
| 7266 |
765 |
|
0.00 |
8477 |
S |
Set |
|
|
Speed Champions |
0 |
0 |
|
| 6929 |
765 |
|
|
8374 |
S |
Set |
|
|
Technic |
0 |
0 |
|
| 7166 |
765 |
|
|
8443 |
S |
Set |
|
|
Minecraft |
0 |
0 |
|
| 6968 |
765 |
|
|
8378 |
S |
Set |
|
|
Duplo |
0 |
0 |
|
| 7162 |
765 |
|
|
8443 |
S |
Set |
|
|
Minecraft |
0 |
0 |
|
| 6930 |
765 |
|
|
8374 |
S |
Set |
|
|
Technic |
0 |
0 |
|
| 7159 |
765 |
|
|
8386 |
S |
Set |
|
|
Marvel |
0 |
0 |
|
| 7072 |
765 |
|
|
8422 |
S |
Set |
|
|
Ninjago |
0 |
0 |
|
| 7092 |
765 |
|
|
8429 |
S |
Set |
|
|
Creator 3in1 |
0 |
0 |
|
| 6934 |
765 |
|
|
8374 |
S |
Set |
|
|
Technic |
0 |
0 |
|
| 7154 |
765 |
|
|
8442 |
S |
Set |
|
|
Ideas |
0 |
0 |
|
| 7018 |
765 |
|
|
8386 |
S |
Set |
|
|
Marvel |
0 |
0 |
|
| 7139 |
765 |
|
|
8439 |
S |
Set |
|
|
Harry Potter |
0 |
0 |
|
| 6935 |
765 |
|
|
8374 |
S |
Set |
|
|
Technic |
0 |
0 |
|
| 7134 |
765 |
|
0.00 |
8439 |
S |
Set |
|
|
Harry Potter |
0 |
0 |
|
| 7133 |
765 |
|
|
8435 |
S |
Set |
|
|
Friends |
0 |
0 |
|
| 6936 |
765 |
|
|
8374 |
S |
Set |
|
|
Technic |
0 |
0 |
|
| 7115 |
765 |
|
|
8435 |
S |
Set |
|
|
Friends |
0 |
0 |
|
| 6906 |
765 |
|
|
8372 |
S |
Set |
|
|
Disney |
0 |
0 |
|