Query time 0.01850
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": 317,
"filtered": 0.555045426,
"attached_condition": "pfv.feature_id in (24981,23350,22219,24183,21148,19929,20043,20294,20571,21032,24611,20251,20035,21060,23317,20301) and pfv.product_id in (49000,32756,25113,40929,26890,2301,5827,27015,5447,4365,3572,2494,45258,4468,5469,2455,32311,4358) 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 |
19929 |
5827 |
69640 |
0 |
T-Peach |
20035 |
5469 |
70053 |
0 |
Thuận Buồm Xuôi Gió |
20043 |
5447 |
70096 |
0 |
Tín |
20251 |
4468 |
70871 |
0 |
Trắng trơn |
20294 |
4365 |
70996 |
0 |
Cứ đi rồi sẽ đến |
20301 |
4358 |
71024 |
0 |
Đầu tư |
20571 |
3572 |
71949 |
0 |
Bát Nhỏ |
21032 |
2494 |
73476 |
0 |
250gr |
21060 |
2455 |
73532 |
0 |
70g |
21148 |
2301 |
73963 |
0 |
Chillin |
22219 |
25113 |
77850 |
0 |
Màu Hồng |
23317 |
32311 |
80887 |
2 |
Mẫu 2 |
23350 |
26890 |
81002 |
1 |
Không mùi |
23350 |
27015 |
81002 |
1 |
Không mùi |
23350 |
32756 |
81007 |
6 |
Hoa lài |
24183 |
40929 |
84256 |
1 |
Hũ xanh nhạt hương rêu |
24611 |
45258 |
85883 |
1 |
Túi hồng viền hồng |
24981 |
49000 |
87126 |
1 |
Lychee Rose |