Query time 0.02687
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": 490,
"filtered": 0.11477302,
"attached_condition": "pfv.feature_id in (21384,25127,25035,21140,22654,23540,24831,24631,24717,19582,20835,24957,19777,21386,24144,25095,19725,23544,24832,20381,21914,20084) and pfv.product_id in (1896,50216,49588,2320,2319,35256,47632,45283,46822,6659,50182,48823,15457,1894,49873,6357,35279,47597,18608,1057,17265) 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 |
19582 |
6659 |
68122 |
0 |
Size S |
19725 |
6357 |
68603 |
0 |
Rose |
19777 |
15457 |
68786 |
0 |
Still Love |
20084 |
17265 |
70241 |
3 |
Trà cỏ ngọt |
20381 |
18608 |
71339 |
0 |
Màu vàng mustard |
20835 |
50182 |
72793 |
2 |
Hình từ 1-2 nhân vật |
21140 |
2320 |
73923 |
0 |
Case AirPods |
21384 |
1896 |
74800 |
0 |
Gỗ Thông |
21386 |
1894 |
74804 |
0 |
Gỗ Thông |
21914 |
1057 |
76706 |
0 |
Màu nâu đậm |
22654 |
2319 |
79318 |
0 |
Ốp airpod |
23540 |
35256 |
81690 |
2 |
Nâu đậm |
23544 |
35279 |
81705 |
2 |
Màu xanh rêu |
24144 |
49873 |
87602 |
4 |
Muối tiêu |
24631 |
45283 |
85980 |
1 |
Original |
24717 |
46822 |
86219 |
2 |
Nâu đậm |
24831 |
47632 |
86593 |
2 |
Sen hồng |
24832 |
47597 |
86594 |
1 |
Sen trắng |
24957 |
48823 |
87021 |
1 |
Xanh dương |
25035 |
49588 |
87335 |
0 |
Bật lửa Đầu Rồng (Đỏ) |
25095 |
49873 |
87603 |
1 |
Lavender |
25127 |
50216 |
87712 |
2 |
A4 |