Query time 0.01395
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": 302,
"filtered": 0.513714671,
"attached_condition": "pfv.feature_id in (20695,20466,23444,23445,20040,21265,23755,21267,23757,19842,20032,19841,20034,20038,19843,19839,20036,23626) and pfv.product_id in (3286,3872,1401,5455,36781,36834,5958,5476,5959,5472,5462,5957,5961,5467,35733) 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 |
19839 |
5961 |
68986 |
0 |
Be creative |
19841 |
5959 |
69004 |
0 |
Be creative |
19842 |
5958 |
69014 |
0 |
Phát |
19843 |
5957 |
69022 |
0 |
Think positive |
20032 |
5476 |
70035 |
0 |
Nhẫn |
20034 |
5472 |
70047 |
0 |
Nhẫn |
20036 |
5467 |
70059 |
0 |
Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG |
20038 |
5462 |
70074 |
0 |
Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG |
20040 |
5455 |
70084 |
0 |
Trắng trơn |
20466 |
3872 |
71590 |
0 |
Vàng |
20695 |
3286 |
72338 |
0 |
Vietnam Mixed |
21265 |
36781 |
74391 |
0 |
Đen |
21267 |
36834 |
74407 |
0 |
Hồng Nude |
23444 |
1401 |
81325 |
1 |
Bộ 6 chiếc |
23445 |
1401 |
81332 |
1 |
Màu men hỏa biến xanh sóng biển |
23626 |
35733 |
81927 |
1 |
Vàng |
23755 |
36781 |
82449 |
0 |
1,6m x 2m (+319,000 ₫) |
23757 |
36834 |
82455 |
0 |
1.6m x 2m |