SELECT 
  pfv.feature_id, 
  pfv.product_id, 
  pfv.variant_id, 
  fv.position, 
  fvd.variant 
FROM 
  cscart_product_features_values AS pfv 
  INNER JOIN cscart_product_feature_variants AS fv ON pfv.feature_id = fv.feature_id 
  AND pfv.variant_id = fv.variant_id 
  INNER JOIN cscart_product_feature_variant_descriptions AS fvd ON pfv.variant_id = fvd.variant_id 
  AND fvd.lang_code = 'vi' 
WHERE 
  pfv.feature_id IN (
    19990, 20043, 20294, 20035, 20251, 20301, 
    20037, 20033, 19838, 20255, 20295, 
    20253, 24779, 20300, 20029, 20039, 
    20302, 20252, 20028
  ) 
  AND pfv.product_id IN (
    5589, 5447, 4365, 5469, 4468, 4358, 5464, 
    5474, 5962, 4464, 4364, 4466, 47280, 
    4359, 5481, 5459, 4357, 4467, 5483
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.07453

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": 408,
          "filtered": 0.032501779,
          "attached_condition": "pfv.feature_id in (19990,20043,20294,20035,20251,20301,20037,20033,19838,20255,20295,20253,24779,20300,20029,20039,20302,20252,20028) and pfv.product_id in (5589,5447,4365,5469,4468,4358,5464,5474,5962,4464,4364,4466,47280,4359,5481,5459,4357,4467,5483) 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
19838 5962 68979 0 Nghĩ khác đi, làm khác đi
19990 5589 69871 0 Áo và váy
20028 5483 70012 0 Mẫu 1
20029 5481 70018 0 Mẫu 1
20033 5474 70046 0 Vượt mọi thử thách
20035 5469 70053 0 Thuận Buồm Xuôi Gió
20037 5464 70066 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
20039 5459 70079 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
20043 5447 70096 0 Tín
20251 4468 70871 0 Trắng trơn
20252 4467 70873 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
20253 4466 70875 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
20255 4464 70879 0 Người chèo thuyền GIỎI không đến từ VÙNG BIỂN LẶNG SÓNG
20294 4365 70996 0 Cứ đi rồi sẽ đến
20295 4364 71000 0 Cứ đi rồi sẽ đến
20300 4359 71020 0 Đầu tư
20301 4358 71024 0 Đầu tư
20302 4357 71028 0 Đầu tư
24779 47280 86429 1 Đỏ