Query time 0.01442
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": "idx_product_feature_variant_id",
"key_length": "12",
"used_key_parts": ["product_id", "feature_id", "lang_code"],
"rows": 162,
"filtered": 0.632363319,
"attached_condition": "pfv.feature_id in (21387,24830,23432,24444,24836,24980,24865,24866,23538,23624,23625,20254,20297) and pfv.product_id in (1893,47631,33312,43825,47656,48998,47654,47984,35254,35859,4465,4362) 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 |
21387 |
1893 |
74806 |
0 |
Gỗ Thông |
20297 |
4362 |
71010 |
0 |
Đầu tư |
20254 |
4465 |
70877 |
0 |
Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG |
23432 |
33312 |
81269 |
1 |
Hộp sen |
23538 |
35254 |
81686 |
2 |
Đen |
23624 |
35859 |
81918 |
2 |
Mèo cái nằm |
23625 |
35859 |
81922 |
1 |
Nâu |
24444 |
43825 |
85255 |
1 |
Trà xanh Cao Bồ 100g + Hồng trà Vị Xuyên 50g |
24830 |
47631 |
86591 |
2 |
Sen hồng |
24836 |
47654 |
86606 |
1 |
Mẫu vẽ hoa sen ngẫu nhiên |
24836 |
47656 |
86606 |
1 |
Mẫu vẽ hoa sen ngẫu nhiên |
24865 |
47984 |
86706 |
1 |
Rồng bố |
24866 |
47984 |
86714 |
4 |
Vàng |
24980 |
48998 |
87124 |
0 |
Da tổng hợp |