Query time 0.00789
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "94.11"
},
"nested_loop": [
{
"table": {
"table_name": "pfv",
"access_type": "range",
"possible_keys": [
"PRIMARY",
"fl",
"variant_id",
"lang_code",
"product_id",
"fpl",
"idx_product_feature_variant_id"
],
"key": "lang_code",
"used_key_parts": [
"lang_code",
"feature_id",
"product_id"
],
"key_length": "12",
"rows_examined_per_scan": 56,
"rows_produced_per_join": 56,
"filtered": "100.00",
"using_index": true,
"cost_info": {
"read_cost": "12.35",
"eval_cost": "11.20",
"prefix_cost": "23.55",
"data_read_per_join": "43K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`webmarco`.`pfv`.`feature_id` in (626,860,1013,1128)) and (`webmarco`.`pfv`.`product_id` in (414502,431672,396068,414480,432460,432542,432589,432449,432642,432668,432523,432652,432688,432694)) and (`webmarco`.`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": [
"webmarco.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "5.00",
"cost_info": {
"read_cost": "56.00",
"eval_cost": "0.56",
"prefix_cost": "90.75",
"data_read_per_join": "3K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`webmarco`.`fv`.`feature_id` = `webmarco`.`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": [
"webmarco.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 2,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.80",
"eval_cost": "0.56",
"prefix_cost": "94.11",
"data_read_per_join": "12K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
626 |
396068 |
7159 |
0 |
2-3 Years |
626 |
414480 |
7159 |
0 |
2-3 Years |
626 |
414502 |
67587 |
0 |
1-2 Years |
626 |
431672 |
7162 |
4 |
5-6 Years |
860 |
431672 |
65302 |
0 |
Baby Blue |
860 |
432449 |
64677 |
0 |
Orange |
860 |
432460 |
64677 |
0 |
Orange |
860 |
432523 |
64475 |
0 |
White |
860 |
432542 |
64062 |
0 |
Black |
860 |
432589 |
64575 |
0 |
Yellow |
860 |
432642 |
64477 |
0 |
Brown |
860 |
432652 |
64691 |
0 |
Purple |
860 |
432668 |
64545 |
0 |
Green |
860 |
432688 |
64475 |
0 |
White |
860 |
432694 |
64475 |
0 |
White |
1013 |
432449 |
64561 |
50 |
86cm / 18-24 (Months) – 1/2 (Years) |
1013 |
432460 |
64561 |
50 |
86cm / 18-24 (Months) – 1/2 (Years) |
1013 |
432523 |
64562 |
60 |
92cm / 24-36 (Months) – 2/3 (Years) |
1013 |
432542 |
64561 |
50 |
86cm / 18-24 (Months) – 1/2 (Years) |
1013 |
432589 |
64561 |
50 |
86cm / 18-24 (Months) – 1/2 (Years) |
1013 |
432642 |
64561 |
50 |
86cm / 18-24 (Months) – 1/2 (Years) |
1013 |
432652 |
67603 |
0 |
6- 12 (Months) |
1013 |
432668 |
67603 |
0 |
6- 12 (Months) |
1128 |
432688 |
67642 |
0 |
6-12 Months |
1128 |
432694 |
67642 |
0 |
6-12 Months |