Query time 0.00127
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "44.26"
},
"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": "PRIMARY",
"used_key_parts": [
"feature_id",
"product_id"
],
"key_length": "6",
"rows_examined_per_scan": 72,
"rows_produced_per_join": 71,
"filtered": "99.73",
"using_index": true,
"cost_info": {
"read_cost": "8.19",
"eval_cost": "7.18",
"prefix_cost": "15.37",
"data_read_per_join": "55K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`wearethehelpful_scalesta_net`.`pfv`.`feature_id` in (568,555,585,574,582)) and (`wearethehelpful_scalesta_net`.`pfv`.`product_id` in (2021,2017,2015,2009,1275,1271,1267,1264,1262,1258,1229,1226,1150,1145)) and (`wearethehelpful_scalesta_net`.`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": [
"wearethehelpful_scalesta_net.pfv.variant_id"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "14.95",
"cost_info": {
"read_cost": "17.95",
"eval_cost": "1.07",
"prefix_cost": "40.50",
"data_read_per_join": "12K"
},
"used_columns": [
"variant_id",
"feature_id",
"position"
],
"attached_condition": "(`wearethehelpful_scalesta_net`.`fv`.`feature_id` = `wearethehelpful_scalesta_net`.`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": [
"wearethehelpful_scalesta_net.pfv.variant_id",
"const"
],
"rows_examined_per_scan": 1,
"rows_produced_per_join": 10,
"filtered": "100.00",
"cost_info": {
"read_cost": "2.68",
"eval_cost": "1.07",
"prefix_cost": "44.26",
"data_read_per_join": "32K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 555 |
1258 |
1245 |
0 |
Small |
| 555 |
1262 |
1283 |
0 |
Large |
| 555 |
1264 |
1245 |
0 |
Small |
| 555 |
1267 |
1344 |
0 |
Extra Small |
| 555 |
1271 |
1245 |
0 |
Small |
| 555 |
1275 |
1283 |
0 |
Large |
| 568 |
2015 |
1463 |
0 |
Black |
| 568 |
2017 |
1279 |
0 |
Blue |
| 568 |
2021 |
1279 |
0 |
Blue |
| 574 |
1150 |
1320 |
0 |
Medium Grind (Filter) |
| 574 |
1229 |
1320 |
0 |
Medium Grind (Filter) |
| 582 |
1145 |
1309 |
0 |
Medium Grind |
| 585 |
1150 |
1323 |
0 |
200g |
| 585 |
1226 |
1323 |
0 |
200g |
| 585 |
1229 |
1323 |
0 |
200g |