Query time 0.02742
JSON explain
{
"query_block": {
"select_id": 1,
"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",
"key_length": "6",
"used_key_parts": ["feature_id", "product_id"],
"rows": 499,
"filtered": 0.714672446,
"attached_condition": "pfv.feature_id in (21328,20328,21912,23512,19936,20327,20527,21426,21925,22368,23274,24742,22459,20221,20439,22576,21430,21711,24952,23951,23952,20941) and pfv.product_id in (22143,4269,1059,33727,16399,4270,3669,22534,1041,25850,31949,47009,222,18160,3975,2257,1835,1356,48772,38552,20804) and pfv.lang_code = 'en'",
"using_index": true
}
},
{
"table": {
"table_name": "fv",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY", "feature_id"],
"key": "PRIMARY",
"key_length": "3",
"used_key_parts": ["variant_id"],
"ref": ["dev_db.pfv.variant_id"],
"rows": 1,
"filtered": 100,
"attached_condition": "fv.feature_id = pfv.feature_id"
}
},
{
"table": {
"table_name": "fvd",
"access_type": "eq_ref",
"possible_keys": ["PRIMARY"],
"key": "PRIMARY",
"key_length": "9",
"used_key_parts": ["variant_id", "lang_code"],
"ref": ["dev_db.pfv.variant_id", "const"],
"rows": 1,
"filtered": 100,
"index_condition": "fvd.lang_code = 'en'"
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
19936 |
16399 |
69660 |
0 |
Pink orange |
20221 |
18160 |
70759 |
0 |
White rabbit |
20327 |
4270 |
71109 |
0 |
37 |
20328 |
4269 |
71117 |
0 |
37 |
20439 |
3975 |
71521 |
0 |
Dragonflies & flowers |
20527 |
3669 |
71773 |
0 |
Set 1 |
20941 |
20804 |
73138 |
0 |
Orange |
21328 |
22143 |
74608 |
0 |
Without you |
21426 |
22534 |
74969 |
0 |
Design 4 |
21430 |
1835 |
74987 |
0 |
Style 5 |
21711 |
1356 |
75916 |
0 |
Black |
21912 |
1059 |
76697 |
0 |
Engraving 1 side |
21925 |
1041 |
76742 |
0 |
Brown, Green and Orange |
22368 |
25850 |
78426 |
0 |
Brown mix yellow |
22459 |
222 |
78815 |
0 |
Design 11 |
22576 |
2257 |
79242 |
0 |
RADERMECKER |
23274 |
31949 |
80725 |
1 |
Pink |
23512 |
33727 |
81601 |
1 |
Tan |
23951 |
38552 |
83392 |
1 |
Baby Blue |
23952 |
38552 |
83399 |
1 |
White |
24742 |
47009 |
86292 |
1 |
Brown |
24952 |
48772 |
87007 |
2 |
Brown |