Query time 0.02308
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": 333,
"filtered": 0.037902936,
"attached_condition": "pfv.feature_id in (24436,20346,19793,22383,19958,20227,24137,24138,24141,21972,21757,22834,23313,23314,21592,22829,21066,23609) and pfv.product_id in (43796,4237,43798,6070,335,5726,18194,40754,40807,926,1266,26851,32360,1542,26857,2449,35735) 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 |
19793 |
6070 |
68828 |
0 |
Bó hoa hồng |
19958 |
5726 |
69750 |
0 |
Nâu rêu |
20227 |
18194 |
70800 |
0 |
Hũ lớn |
20346 |
4237 |
71205 |
0 |
My beaute |
21066 |
2449 |
73561 |
0 |
Sả Java |
21592 |
1542 |
75511 |
0 |
250ml |
21757 |
1266 |
76075 |
0 |
Sữa rửa mặt Carrot Cake |
21972 |
926 |
76910 |
0 |
Xịt thư giãn |
22383 |
335 |
78476 |
0 |
Tóc Nhuộm |
22829 |
26857 |
79640 |
0 |
110g |
22834 |
26851 |
79650 |
0 |
360g |
23313 |
32360 |
80876 |
1 |
Bình nhỏ |
23314 |
32360 |
80879 |
2 |
Men nửa bình - Đỏ cam |
23609 |
35735 |
81862 |
1 |
25g |
24137 |
40754 |
84125 |
1 |
18 x 12 x 2cm |
24138 |
40754 |
84128 |
1 |
Xanh lá |
24141 |
40807 |
84144 |
1 |
127g |
24436 |
43796 |
85226 |
0 |
Hũ lớn |
24436 |
43798 |
85226 |
0 |
Hũ lớn |