Query time 0.01916
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": "idx_product_feature_variant_id",
"key_length": "12",
"used_key_parts": ["product_id", "feature_id", "lang_code"],
"rows": 120,
"filtered": 0.374926805,
"attached_condition": "pfv.feature_id in (21629,20210,24191,20543,22832,24137,24138,22834,23313,23314,24141,22829) and pfv.product_id in (23169,4795,37881,3640,27056,40754,26851,32360,40807,26857) 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 |
20543 |
3640 |
71863 |
0 |
I love you |
20210 |
4795 |
70723 |
0 |
Gradient orange |
21629 |
23169 |
75645 |
0 |
Style 1 |
22834 |
26851 |
79650 |
0 |
360g |
22829 |
26857 |
79640 |
0 |
110g |
22832 |
27056 |
79647 |
0 |
500g |
23313 |
32360 |
80876 |
1 |
Small vase |
23314 |
32360 |
80879 |
2 |
Half-enameled in reddish orange |
24191 |
37881 |
84291 |
1 |
Twilly 120cm x 5cm |
24137 |
40754 |
84125 |
1 |
18 x 12 x 2cm |
24138 |
40754 |
84128 |
1 |
Green |
24141 |
40807 |
84144 |
1 |
127g |