Query time 0.01390
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": 248,
"filtered": 0.45747602,
"attached_condition": "pfv.feature_id in (24142,22369,20982,21419,21215,19667,22828,22835,20950,22332,19668,24191,21211,22569,24436) and pfv.product_id in (40808,351,2565,1850,2155,6527,26858,26848,2626,406,6526,41130,21746,2250,43796) 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 |
19667 |
6527 |
68397 |
0 |
Khóm hoa nhiều màu |
19668 |
6526 |
68400 |
0 |
Khóm hoa xanh |
20950 |
2626 |
73188 |
0 |
Be |
20982 |
2565 |
73310 |
0 |
Thùng 6 chai |
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 |
22332 |
406 |
78275 |
0 |
Cam đỏ gạch của mái ngói, màu đất nung |
22369 |
351 |
78430 |
0 |
Cúc bấm trong đen phối hồng |
22569 |
2250 |
79220 |
0 |
RADERMECKER |
22828 |
26858 |
79638 |
0 |
110g |
22835 |
26848 |
79652 |
0 |
360g |
24142 |
40808 |
84147 |
1 |
127g |
24191 |
41130 |
84292 |
2 |
60cm x 60cm |
24436 |
43796 |
85226 |
0 |
Hũ lớn |