Query time 0.01422
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": 0.199350789,
"attached_condition": "pfv.feature_id in (24054,20263,20258,20260,20261,20259) and pfv.product_id in (40149,18264,4442,4440,18258,4441) 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 |
20260 |
4440 |
70896 |
0 |
Mèo tím |
20259 |
4441 |
70893 |
0 |
Girly |
20258 |
4442 |
70888 |
0 |
Mona Lisa |
20261 |
18258 |
70897 |
0 |
Hổ trắng |
20263 |
18264 |
70905 |
0 |
Almond Blossom |
24054 |
40149 |
83821 |
1 |
Mẫu 1 |