Query time 0.01323
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": 36,
"filtered": 100,
"attached_condition": "pfv.feature_id in (20214,20210,20212,20213,20211,20206) and pfv.product_id in (4785,4795,4789,4787,4793,4803) 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 |
20214 |
4785 |
70744 |
0 |
Màu tím loang xanh dương, đỏ, cam |
20213 |
4787 |
70739 |
0 |
Màu cam loang |
20212 |
4789 |
70734 |
0 |
Màu cam loang |
20211 |
4793 |
70729 |
0 |
Màu cam loang |
20210 |
4795 |
70723 |
0 |
Màu cam loang |
20206 |
4803 |
70708 |
0 |
Màu loang nâu, xanh lá |