Query time 0.03365
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": 238,
"filtered": 0.027683349,
"attached_condition": "pfv.feature_id in (23733,24476,24862,23480,24181,24182,24499,23728,24937,24888,24547,24829,24828,24523,23641,24834) and pfv.product_id in (36300,44278,47967,33698,40928,44575,36293,48680,48150,44941,47622,44752,35705,47608) 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 |
23480 |
33698 |
81481 |
1 |
Fern |
23641 |
35705 |
81976 |
1 |
Earrings |
23728 |
36293 |
82362 |
1 |
Red |
23733 |
36300 |
82383 |
1 |
Black |
24181 |
40928 |
84249 |
1 |
Box of 2 candles |
24182 |
40928 |
84251 |
1 |
Sunday Morning |
24476 |
44278 |
85377 |
1 |
Gold-plated copper |
24499 |
44575 |
85463 |
1 |
Black |
24523 |
44752 |
85546 |
1 |
Gold-plated copper earrings |
24547 |
44941 |
85613 |
1 |
18mm |
24828 |
47622 |
86585 |
1 |
2 herbal eye patches |
24829 |
47622 |
86587 |
1 |
Refresh lavender |
24834 |
47608 |
86598 |
1 |
White lotus |
24862 |
47967 |
86694 |
3 |
be happy |
24888 |
48150 |
86820 |
1 |
Thanh Tra pomelo soap |
24937 |
48680 |
86950 |
1 |
Single candle 100g |