Query time 0.00146
JSON explain
{
"query_block": {
"select_id": 1,
"cost_info": {
"query_cost": "49.22"
},
"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": 81,
"rows_produced_per_join": 80,
"filtered": "99.74",
"using_index": true,
"cost_info": {
"read_cost": "9.18",
"eval_cost": "8.08",
"prefix_cost": "17.26",
"data_read_per_join": "62K"
},
"used_columns": [
"feature_id",
"product_id",
"variant_id",
"lang_code"
],
"attached_condition": "((`wearethehelpful_scalesta_net`.`pfv`.`feature_id` in (604,603,606,568)) and (`wearethehelpful_scalesta_net`.`pfv`.`product_id` in (2121,2122,2123,2124,2125,2120,2115,2116,2117,2114,2110,2111,2112,2109,2106,2107,2108,2105,2091,2068)) 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": "13.03",
"cost_info": {
"read_cost": "20.20",
"eval_cost": "1.05",
"prefix_cost": "45.54",
"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.63",
"eval_cost": "1.05",
"prefix_cost": "49.22",
"data_read_per_join": "31K"
},
"used_columns": [
"variant_id",
"variant",
"lang_code"
]
}
}
]
}
}
Result
| feature_id |
product_id |
variant_id |
position |
variant |
| 568 |
2091 |
1463 |
0 |
Black |
| 603 |
2068 |
1516 |
0 |
green |
| 603 |
2105 |
1515 |
0 |
Black |
| 603 |
2106 |
1515 |
0 |
Black |
| 603 |
2107 |
1523 |
0 |
Blue |
| 603 |
2108 |
1523 |
0 |
Blue |
| 603 |
2109 |
1515 |
0 |
Black |
| 603 |
2110 |
1515 |
0 |
Black |
| 603 |
2111 |
1523 |
0 |
Blue |
| 603 |
2112 |
1523 |
0 |
Blue |
| 603 |
2114 |
1526 |
0 |
Blauw |
| 603 |
2115 |
1526 |
0 |
Blauw |
| 603 |
2116 |
1526 |
0 |
Blauw |
| 603 |
2117 |
1526 |
0 |
Blauw |
| 603 |
2120 |
1521 |
0 |
red |
| 603 |
2121 |
1521 |
0 |
red |
| 603 |
2122 |
1521 |
0 |
red |
| 603 |
2123 |
1533 |
0 |
white |
| 603 |
2124 |
1533 |
0 |
white |
| 603 |
2125 |
1533 |
0 |
white |
| 604 |
2105 |
1518 |
0 |
L |
| 604 |
2106 |
1517 |
0 |
m |
| 604 |
2107 |
1517 |
0 |
m |
| 604 |
2108 |
1518 |
0 |
L |
| 604 |
2109 |
1517 |
0 |
m |
| 604 |
2110 |
1518 |
0 |
L |
| 604 |
2111 |
1517 |
0 |
m |
| 604 |
2112 |
1518 |
0 |
L |
| 604 |
2114 |
1524 |
0 |
x |
| 604 |
2115 |
1524 |
0 |
x |
| 604 |
2116 |
1525 |
0 |
y |
| 604 |
2117 |
1525 |
0 |
y |
| 604 |
2120 |
1531 |
0 |
a |
| 604 |
2121 |
1530 |
0 |
c |
| 604 |
2122 |
1532 |
0 |
nb |
| 604 |
2123 |
1530 |
0 |
c |
| 604 |
2124 |
1531 |
0 |
a |
| 604 |
2125 |
1532 |
0 |
nb |
| 606 |
2114 |
1528 |
0 |
a |
| 606 |
2115 |
1527 |
0 |
n |
| 606 |
2116 |
1527 |
0 |
n |
| 606 |
2117 |
1528 |
0 |
a |