Query time 0.00214
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "162.21"
},
"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": 31,
"rows_produced_per_join": 31,
"filtered": "100.00",
"index_condition": "((`portal`.`v`.`feature_id` = 2) and (`portal`.`v`.`product_id` in (50381,50382,50383,50385,50386,50387,50388,50389,50390,50391,50392,50393,50232,50240,50310,50308,50283,50301,50280,50291,50272,50276,50269,50312,50313,50314,50315,50316,50317,50318)) and (`portal`.`v`.`lang_code` = 'en'))",
"cost_info": {
"read_cost": "67.21",
"eval_cost": "6.20",
"prefix_cost": "73.41",
"data_read_per_join": "23K"
},
"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": 31,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "6.20",
"prefix_cost": "80.61",
"data_read_per_join": "47K"
},
"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": 31,
"filtered": "100.00",
"cost_info": {
"read_cost": "31.00",
"eval_cost": "6.20",
"prefix_cost": "117.81",
"data_read_per_join": "35K"
},
"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": 31,
"filtered": "100.00",
"cost_info": {
"read_cost": "31.00",
"eval_cost": "6.20",
"prefix_cost": "155.01",
"data_read_per_join": "93K"
},
"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": 31,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.00",
"eval_cost": "6.20",
"prefix_cost": "162.21",
"data_read_per_join": "13K"
},
"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 |
50385 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50280 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50393 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50314 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50386 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50283 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50315 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50387 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50291 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50316 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50317 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50232 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50388 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50301 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50318 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50240 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50389 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50308 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50381 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50269 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50390 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50310 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50382 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50272 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50391 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50312 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50383 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50276 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50392 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|
50313 |
2 |
|
|
84 |
E |
Brand |
|
1 |
0 |
1 |
Deals For Less |
|