Query time 0.03149
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": 262,
"filtered": 0.750989437,
"attached_condition": "pfv.feature_id in (21384,24869,24868,21387,24996,21386,21623,24144,25095,21914,21490,24443,22036,24444,23515,23512,22034) and pfv.product_id in (1896,33725,1893,49164,1894,23152,49873,1057,1716,43824,854,43825,33724,856) 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 |
21384 |
1896 |
74800 |
0 |
Gỗ Thông |
21386 |
1894 |
74804 |
0 |
Gỗ Thông |
21387 |
1893 |
74806 |
0 |
Gỗ Thông |
21490 |
1716 |
75210 |
0 |
Dạng bột |
21623 |
23152 |
75622 |
0 |
Đũa gỗ trắc đầu vỏ ốc bọc bạc |
21914 |
1057 |
76706 |
0 |
Màu nâu đậm |
22034 |
856 |
77111 |
1 |
12mm |
22036 |
854 |
77120 |
3 |
Standard 6mm |
23512 |
33724 |
81601 |
1 |
Nâu tan |
23515 |
33724 |
81626 |
1 |
3 con mèo |
24144 |
49873 |
87602 |
4 |
Muối tiêu |
24443 |
43824 |
85249 |
1 |
Trà xanh Shan tuyết 600 tuổi |
24444 |
43825 |
85255 |
1 |
Trà xanh Cao Bồ 100g + Hồng trà Vị Xuyên 50g |
24868 |
33725 |
86725 |
1 |
Con hổ |
24869 |
33725 |
86729 |
1 |
Kiểu 1 |
24996 |
49164 |
87185 |
1 |
Seigaiha |
25095 |
49873 |
87603 |
1 |
Lavender |