Query time 0.00956
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": 305,
"filtered": 0.484439731,
"attached_condition": "pfv.feature_id in (24959,23620,23621,23622,23623,23618,23619,20040,23249,23250,23624,23625,19842,20032,22482,20254,20297,23469,23470,19841) and pfv.product_id in (48839,35730,35731,35729,5455,31872,35859,5958,5476,189,4465,4362,33606,5959) 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 |
19841 |
5959 |
69004 |
0 |
Be creative |
19842 |
5958 |
69014 |
0 |
Phát |
20032 |
5476 |
70035 |
0 |
Nhẫn |
20040 |
5455 |
70084 |
0 |
Trắng trơn |
20254 |
4465 |
70877 |
0 |
Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG |
20297 |
4362 |
71010 |
0 |
Đầu tư |
22482 |
189 |
78917 |
0 |
Nâu |
23249 |
31872 |
80616 |
5 |
Size 5 |
23250 |
31872 |
80618 |
2 |
Hồng |
23469 |
33606 |
81440 |
1 |
Chó con 1 |
23470 |
33606 |
81445 |
1 |
Xanh lam |
23618 |
35729 |
81888 |
1 |
Baby fish |
23619 |
35729 |
81892 |
1 |
Yellow |
23620 |
35730 |
81898 |
1 |
Mèo con nằm đuôi thẳng |
23621 |
35730 |
81905 |
1 |
Xanh lục |
23622 |
35731 |
81910 |
1 |
Mèo cái nằm |
23623 |
35731 |
81913 |
1 |
Đỏ |
23624 |
35859 |
81918 |
2 |
Mèo cái nằm |
23625 |
35859 |
81922 |
1 |
Nâu |
24959 |
48839 |
87026 |
1 |
2 thành viên |