Query time 0.05421
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": 204,
"filtered": 0.063611358,
"attached_condition": "pfv.feature_id in (24717,24703,25015,23738,23731,25008,21894,25006,23110,20545,24997,24996) and pfv.product_id in (49309,49306,49304,49302,49300,49265,49256,49251,49230,49225,49221,49199,49192,49186,49169,49164) 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 |
20545 |
49192 |
71868 |
0 |
Be mine |
21894 |
49225 |
76639 |
0 |
Pink |
23110 |
49199 |
80108 |
1 |
Enchant |
23731 |
49251 |
82379 |
4 |
Mallard |
23738 |
49256 |
82406 |
5 |
Teal |
24703 |
49306 |
86163 |
3 |
Dark brown |
24717 |
49186 |
86219 |
2 |
Dark brown |
24717 |
49265 |
86218 |
1 |
Purple |
24717 |
49309 |
86220 |
3 |
Black |
24996 |
49164 |
87185 |
1 |
Seigaiha |
24997 |
49169 |
87191 |
2 |
2. Dark brown |
25006 |
49221 |
87223 |
0 |
2 cookies |
25008 |
49230 |
87232 |
1 |
Small |
25015 |
49300 |
87262 |
1 |
Warm light |
25015 |
49302 |
87262 |
1 |
Warm light |
25015 |
49304 |
87262 |
1 |
Warm light |