Query time 0.01618
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": 277,
"filtered": 0.487687647,
"attached_condition": "pfv.feature_id in (21972,21757,22834,23313,23314,21592,20170,22829,24225,22577,21066,24191,20211,23717,24230,22566) and pfv.product_id in (926,1266,26851,32360,1542,4865,26857,41423,2259,2449,41134,4793,41102,36494,41428,2248) 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 |
20170 |
4865 |
70582 |
0 |
Cành hoa và cá |
20211 |
4793 |
70729 |
0 |
Màu cam loang |
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 |
22566 |
2248 |
79214 |
0 |
RADERMECKER |
22577 |
2259 |
79245 |
0 |
RADERMECKER |
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 |
23717 |
36494 |
82333 |
1 |
Trắng |
24191 |
41102 |
84292 |
2 |
60cm x 60cm |
24191 |
41134 |
84292 |
2 |
60cm x 60cm |
24225 |
41423 |
84401 |
1 |
Cam |
24230 |
41428 |
84422 |
1 |
Đỏ |