Query time 0.04163
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": 144,
"filtered": 0.519549847,
"attached_condition": "pfv.feature_id in (20468,21575,23432,23233,20695,20466,22516,20077,23485,21323,24207,24204) and pfv.product_id in (3870,1582,33312,31633,3286,3872,113,5300,33744,1980,41281,41282) and pfv.lang_code = 'vi'",
"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 = 'vi'"
}
}
]
}
}
Result
feature_id |
product_id |
variant_id |
position |
variant |
22516 |
113 |
79032 |
0 |
Hộp 250gr |
21575 |
1582 |
75461 |
0 |
Túi 100g |
21323 |
1980 |
74593 |
0 |
Túi Zip |
20695 |
3286 |
72338 |
0 |
Vietnam Mixed |
20468 |
3870 |
71602 |
0 |
Mẫu 5 |
20466 |
3872 |
71590 |
0 |
Vàng |
20077 |
5300 |
70176 |
7 |
The Slumber |
23233 |
31633 |
80578 |
1 |
40g |
23432 |
33312 |
81269 |
1 |
Hộp sen |
23485 |
33744 |
81495 |
1 |
100g |
24207 |
41281 |
84343 |
1 |
100g |
24204 |
41282 |
84337 |
1 |
100g |