Query time 0.14030
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": 453,
"filtered": 0.035664216,
"attached_condition": "pfv.feature_id in (21426,21430,24952,21217,20599,24214,20604,23648,23649,23148,21913,20608,22677,20347,20576,21915,21473,21475,19605,20607,20609) and pfv.product_id in (22534,1835,48772,2150,19270,41334,3528,1408,29698,1058,19289,1838,4236,3563,1056,1764,1763,6617,3525,3523) 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 |
19605 |
6617 |
68191 |
0 |
125g |
20347 |
4236 |
71210 |
0 |
Mùa đông |
20576 |
3563 |
71966 |
0 |
Matrix D1 |
20599 |
19270 |
72041 |
0 |
Y Thanh |
20604 |
3528 |
72059 |
0 |
Polka Dots |
20607 |
3525 |
72068 |
0 |
Osaka |
20608 |
19289 |
72069 |
0 |
Pipa D1 |
20609 |
3523 |
72074 |
0 |
Polka Dots |
21217 |
2150 |
74219 |
0 |
Màu xanh da trời |
21426 |
22534 |
74969 |
0 |
Kiểu 4 |
21430 |
1835 |
74987 |
0 |
Mẫu 5 |
21473 |
1764 |
75165 |
0 |
Mẫu 1 |
21475 |
1763 |
75172 |
0 |
Khắc laze |
21913 |
1058 |
76702 |
0 |
Keep Going |
21915 |
1056 |
76710 |
0 |
Màu cam |
22677 |
1838 |
79377 |
1 |
Mẫu 1 |
23148 |
29698 |
80250 |
1 |
Nhà hát lớn |
23648 |
1408 |
81996 |
1 |
Màu men hỏa biến xanh sóng biển |
23649 |
1408 |
81998 |
1 |
Bộ Phin & Cốc cà phê |
24214 |
41334 |
84373 |
3 |
500g |
24952 |
48772 |
87007 |
2 |
Nâu |