Query time 0.00136
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "60.79"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl"
],
"key": "PRIMARY",
"used_key_parts": [
"feature_id",
"product_id"
],
"key_length": "6",
"rows_examined_per_scan": 52,
"rows_produced_per_join": 29,
"filtered": "56.37",
"using_index": true,
"cost_info": {
"read_cost": "17.99",
"eval_cost": "5.86",
"prefix_cost": "23.85",
"data_read_per_join": "22K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`portal`.`pfv`.`feature_id` in (73,74)) and (`portal`.`pfv`.`product_id` in (3028,3033,3038,3043,3067,3071,2942,2946,2951,2955,2959,2963,2972,2976,2980,2984)) and (`portal`.`pfv`.`lang_code` = 'en'))"
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY",
"feature_id"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id"
],
"key_length": "3",
"ref": [
"portal.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "5.00",
"cost_info": {
"read_cost": "29.31",
"eval_cost": "0.29",
"prefix_cost": "59.03",
"data_read_per_join": "1K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`portal`.`fv`.`feature_id` = `portal`.`pfv`.`feature_id`)"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": [
"PRIMARY"
],
"key": "PRIMARY",
"used_key_parts": [
"variant_id",
"lang_code"
],
"key_length": "9",
"ref": [
"portal.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 1,
"filtered": "100.00",
"cost_info": {
"read_cost": "1.47",
"eval_cost": "0.29",
"prefix_cost": "60.79",
"data_read_per_join": "4K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
73 |
2942 |
9802 |
0 |
M |
73 |
2946 |
9802 |
0 |
M |
73 |
2951 |
9802 |
0 |
M |
73 |
2955 |
9802 |
0 |
M |
73 |
2959 |
9802 |
0 |
M |
73 |
2963 |
9802 |
0 |
M |
73 |
2972 |
9802 |
0 |
M |
73 |
2976 |
9802 |
0 |
M |
73 |
2980 |
9802 |
0 |
M |
73 |
2984 |
9802 |
0 |
M |
73 |
3028 |
9801 |
0 |
S |
73 |
3033 |
9801 |
0 |
S |
73 |
3038 |
9801 |
0 |
S |
73 |
3043 |
9802 |
0 |
M |
73 |
3067 |
9801 |
0 |
S |
73 |
3071 |
9801 |
0 |
S |
74 |
2963 |
9898 |
0 |
Royal Blue |
74 |
3043 |
9900 |
0 |
Green |
74 |
3067 |
9866 |
0 |
Blue |