Query time 0.01599
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": 359,
"filtered": 0.755200744,
"attached_condition": "pfv.feature_id in (24869,24868,24439,23514,23512,20695,20466,22035,22036,23533,23530,23622,23623,21665,24727,22298,24231,23515,22034,23513) and pfv.product_id in (33725,43652,33723,3286,3872,855,854,35176,35172,35731,23261,46982,464,41429,33724,856,34053) 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 |
20466 |
3872 |
71590 |
0 |
Vàng |
20695 |
3286 |
72338 |
0 |
Vietnam Mixed |
21665 |
23261 |
75763 |
0 |
Trọn bộ |
22034 |
856 |
77111 |
1 |
12mm |
22035 |
855 |
77117 |
1 |
6mm |
22036 |
854 |
77120 |
3 |
Standard 6mm |
22298 |
464 |
78147 |
4 |
Domino Đen |
23512 |
33723 |
81601 |
1 |
Nâu tan |
23512 |
33724 |
81601 |
1 |
Nâu tan |
23512 |
34053 |
81610 |
10 |
Đỏ |
23513 |
34053 |
81619 |
2 |
Hoạ tiết động vật theo ý khách |
23514 |
33723 |
81621 |
1 |
Con cáo |
23515 |
33724 |
81626 |
1 |
3 con mèo |
23530 |
35172 |
81665 |
1 |
Set 1 |
23533 |
35176 |
81672 |
1 |
Dây dài 12-15cm |
23622 |
35731 |
81910 |
1 |
Mèo cái nằm |
23623 |
35731 |
81913 |
1 |
Đỏ |
24231 |
41429 |
84426 |
1 |
Đỏ |
24439 |
43652 |
85238 |
1 |
Đỏ |
24727 |
46982 |
86256 |
1 |
Màu xanh |
24868 |
33725 |
86725 |
1 |
Con hổ |
24869 |
33725 |
86729 |
1 |
Kiểu 1 |