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 (
    21387, 21463, 20381, 21341, 24913, 21338, 
    24568, 24569, 24552, 24551, 24566, 
    24567, 24231, 22034, 24191, 23690, 
    23691, 24459, 24460, 24223, 21655, 
    24850, 20318, 23490, 20454, 22557, 
    23693, 23692, 19813
  ) 
  AND pfv.product_id IN (
    1893, 1773, 18608, 1942, 48503, 1946, 
    44946, 44943, 44944, 44947, 44945, 
    41429, 856, 41123, 36329, 6282, 6284, 
    41421, 1429, 6211, 4305, 33716, 3885, 
    51, 36339, 6050
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.12382

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": "product_id",
          "key_length": "3",
          "used_key_parts": ["product_id"],
          "rowid_filter": {
            "range": {
              "key": "fl",
              "used_key_parts": ["feature_id", "lang_code"]
            },
            "rows": 884,
            "selectivity_pct": 0.558772218
          },
          "rows": 180,
          "filtered": 4.420897007,
          "index_condition": "pfv.product_id in (1893,1773,18608,1942,48503,1946,44946,44943,44944,44947,44945,41429,856,41123,36329,6282,6284,41421,1429,6211,4305,33716,3885,51,36339,6050)",
          "attached_condition": "pfv.feature_id in (21387,21463,20381,21341,24913,21338,24568,24569,24552,24551,24566,24567,24231,22034,24191,23690,23691,24459,24460,24223,21655,24850,20318,23490,20454,22557,23693,23692,19813) and pfv.lang_code = 'vi'"
        }
      },
      {
        "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
22557 51 79199 0 Xanh
22034 856 77111 1 12mm
21655 1429 75729 0 Màu xanh dương (70 x 70 cm)
21463 1773 75126 0 24 tháng
21387 1893 74806 0 Gỗ Thông
21341 1942 74652 0 Trắng
21338 1946 74646 0 Trắng
20454 3885 71556 0 Size 37
20318 4305 71072 0 Size lớn
19813 6050 68904 0 Xanh lá và Xanh dương
24850 6211 86656 1 34
24459 6282 85305 1 Hoa sao nhí
24460 6284 85317 1 Thiên nga bay từ trái sang
20381 18608 71339 0 Màu vàng mustard
23490 33716 81505 1 Size XS
23691 36329 82153 12 Vàng Mustard
23690 36329 82141 2 Set 2 bao gối
23692 36339 82154 1 Kích thước chuẩn
23693 36339 82165 10 Trắng
24191 41123 84293 3 90cm x 90cm
24223 41421 84391 1 Đen
24231 41429 84426 1 Đỏ
24551 44943 85626 1 Trắng
24552 44943 85634 1 Size S
24567 44944 85746 1 Size S
24566 44944 85738 1 Trắng
24569 44945 85757 1 Size S
24568 44945 85749 1 Trắng
24569 44946 85757 1 Size S
24568 44946 85749 1 Trắng
24569 44947 85757 1 Size S
24551 44947 85626 1 Trắng
24913 48503 86882 0 size S