Query time 0.00171
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "187.41"
},
"ordering_operation": {
"using_temporary_table": true,
"using_filesort": true,
"nested_loop": [
{
"table": {
"table_name": "f",
"access_type": "const",
"possible_keys": [
"PRIMARY",
"status"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_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.20",
"prefix_cost": "0.00",
"data_read_per_join": "432"
},
"used_columns": [
"feature_id",
"feature_type",
"categories_path",
"parent_id",
"display_on_catalog",
"status",
"position"
]
}
},
{
"table": {
"table_name": "v",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl"
],
"key": "fpl",
"used_key_parts": [
"feature_id",
"product_id",
"lang_code"
],
"key_length": "12",
"rows_examined_per_scan": 37,
"rows_produced_per_join": 37,
"filtered": "100.00",
"index_condition": "((`portal`.`v`.`feature_id` = 2) and (`portal`.`v`.`product_id` in (8790,8791,8792,9050,9052,9053,9054,9055,9056,9057,9058,9817,9818,9819,9820,9821,9822,9823,9824,9825,9826,9827,9828,9829,9830,9831,9832,9833,9834,9835)) and (`portal`.`v`.`lang_code` = 'en'))",
"cost_info": {
"read_cost": "74.41",
"eval_cost": "7.40",
"prefix_cost": "81.81",
"data_read_per_join": "28K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"value",
"value_int",
"lang_code"
],
"attached_condition": "((if('1',(/* select#2 */ select 'A' from `portal`.`q_product_features` `df` where 1),'A') = 'A') and ((`portal`.`v`.`variant_id` <> 0) or (<cache>(('E' <> 'C')) and (`portal`.`v`.`value` <> '')) or <cache>(('E' = 'C')) or (`portal`.`v`.`value_int` <> '')))",
"attached_subqueries": [
{
"dependent": true,
"cacheable": false,
"query_block": {
"select_id": 2,
"cost_info": {
"query_cost": "1.00"
},
"table": {
"table_name": "df",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_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.20",
"prefix_cost": "0.00",
"data_read_per_join": "432"
},
"used_columns": [
"feature_id",
"status"
]
}
}
}
]
}
},
{
"table": {
"table_name": "fd",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"lang_code"
],
"key_length": "9",
"ref": [
"const",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 37,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "7.40",
"prefix_cost": "90.21",
"data_read_per_join": "56K"
},
"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": [
"portal.v.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 37,
"filtered": "100.00",
"cost_info": {
"read_cost": "37.00",
"eval_cost": "7.40",
"prefix_cost": "134.61",
"data_read_per_join": "42K"
},
"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": [
"portal.fv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 37,
"filtered": "100.00",
"cost_info": {
"read_cost": "37.00",
"eval_cost": "7.40",
"prefix_cost": "179.01",
"data_read_per_join": "111K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
},
{
"table": {
"table_name": "gf",
"access_type": "const",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id"
],
"key_length": "3",
"ref": [
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 37,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "7.40",
"prefix_cost": "187.41",
"data_read_per_join": "15K"
},
"used_columns": [
"feature_id",
"feature_type",
"position"
],
"attached_condition": "<if>(is_not_null_compl(gf), (`portal`.`gf`.`feature_type` = 'G'), true)"
}
}
]
}
}
}
Result
product_id |
feature_id |
value |
value_int |
variant_id |
feature_type |
description |
prefix |
parent_id |
position |
gposition |
variant |
suffix |
9827 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9053 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9835 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9819 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9828 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9054 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9820 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9829 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9055 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9821 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9822 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
8790 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9830 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9056 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9823 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
8791 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9831 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9057 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9824 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
8792 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9832 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9058 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9825 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9050 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9833 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9817 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9826 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9052 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9834 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|
9818 |
2 |
|
|
6112 |
E |
Brand |
|
1 |
0 |
1 |
PanzerGlass |
|