Query time 0.01793
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": 252,
"filtered": 0.500331402,
"attached_condition": "pfv.feature_id in (20721,23482,24191,19816,21043,19814,21042,20621,20186,20982,21419,21215,20950,21211) and pfv.product_id in (3196,33701,37885,6045,2472,15613,2473,3465,4823,2565,1850,2155,2626,41130,21746,37881) 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 |
19814 |
15613 |
68905 |
0 |
Xanh ngọc |
19816 |
6045 |
68916 |
0 |
Xanh oliu |
20186 |
4823 |
70634 |
0 |
Size 36 (24cm) |
20621 |
3465 |
72104 |
0 |
Hình tháp |
20721 |
3196 |
72394 |
0 |
200g |
20950 |
2626 |
73188 |
0 |
Be |
20982 |
2565 |
73310 |
0 |
Thùng 6 chai |
21042 |
2473 |
73497 |
0 |
30ml |
21043 |
2472 |
73499 |
0 |
30ml |
21211 |
21746 |
74203 |
0 |
Hồng dịu dàng |
21215 |
2155 |
74214 |
0 |
Mẫu 3 |
21419 |
1850 |
74939 |
0 |
Xen sọc trắng |
23482 |
33701 |
81485 |
1 |
Đỏ trắng |
24191 |
37881 |
84291 |
1 |
Twilly 120cm x 5cm |
24191 |
37885 |
84291 |
1 |
Twilly 120cm x 5cm |
24191 |
41130 |
84292 |
2 |
60cm x 60cm |