Query time 0.00668
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": 67,
"filtered": 0.202326179,
"attached_condition": "pfv.feature_id in (23620,23621,23618,23619,23249,23250,23624,23625,23469,23470,24779) and pfv.product_id in (35829,35792,31872,35855,33606,47280) 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 |
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 |
35792 |
81889 |
2 |
Mother fish |
23619 |
35792 |
81892 |
1 |
Yellow |
23620 |
35829 |
81902 |
5 |
Mèo mẹ |
23621 |
35829 |
81905 |
1 |
Xanh lục |
23624 |
35855 |
81917 |
1 |
Cá nhỏ cắm hoa |
23625 |
35855 |
81923 |
2 |
Xanh dương |
24779 |
47280 |
86429 |
1 |
Đỏ |