Query time 0.03074
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": 145,
"filtered": 0.040279727,
"attached_condition": "pfv.feature_id in (20084,20470,20469,24836,23521,20468,21575,23432,23233,20695,20466,22516) and pfv.product_id in (17265,3868,3869,47655,34555,3870,1582,33312,31633,3286,3872,113) 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 |
20695 |
3286 |
72338 |
0 |
Vietnam Mixed |
20470 |
3868 |
71615 |
0 |
Heo con nhỏ |
20469 |
3869 |
71611 |
0 |
Mẫu 9 |
20468 |
3870 |
71602 |
0 |
Mẫu 5 |
20466 |
3872 |
71590 |
0 |
Vàng |
20084 |
17265 |
70241 |
3 |
Trà cỏ ngọt |
23233 |
31633 |
80578 |
1 |
40g |
23432 |
33312 |
81269 |
1 |
Hộp sen |
23521 |
34555 |
81643 |
1 |
Hộp Đỏ - Xanh lá |
24836 |
47655 |
86606 |
1 |
Mẫu vẽ hoa sen ngẫu nhiên |