Query time 0.00529
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": 101,
"filtered": 0.027248707,
"attached_condition": "pfv.feature_id in (24673,20215,20241,20245,20239,20247,20217,20244,20216,20243) and pfv.product_id in (46176,4688,4508,4498,4510,4495,4687,4505,4694,4506) 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 |
20247 |
4495 |
70853 |
0 |
What a perfect pair we are |
20245 |
4498 |
70848 |
0 |
What is this? I’m BLIND! |
20244 |
4505 |
70846 |
0 |
Keep calm & Carry on |
20243 |
4506 |
70843 |
0 |
Friends forever |
20241 |
4508 |
70837 |
0 |
Hồng |
20239 |
4510 |
70831 |
0 |
Older wiser funnier |
20217 |
4687 |
70750 |
0 |
Màu vàng |
20215 |
4688 |
70746 |
0 |
Hoa lớn |
20216 |
4694 |
70748 |
0 |
Vàng - Xanh lá |
24673 |
46176 |
86083 |
1 |
Đen |