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 (
    23815, 23895, 24077, 24076, 23814, 23868, 
    24074, 24075, 23867
  ) 
  AND pfv.product_id IN (
    37720, 38289, 40379, 40378, 37713, 38038, 
    40384, 40385, 38037
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.02395

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": 81,
          "filtered": 0.010956318,
          "attached_condition": "pfv.feature_id in (23815,23895,24077,24076,23814,23868,24074,24075,23867) and pfv.product_id in (37720,38289,40379,40378,37713,38038,40384,40385,38037) 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
23814 37713 82847 1 CBS002
23815 37720 82852 3 Sprout Up
23867 38037 83032 2 Size 17~18.9cm
23868 38038 83034 2 Size 17~18.9cm
23895 38289 83144 2 Mẫu 2
24076 40378 83892 1 Size 15~16.9cm
24077 40379 83894 1 Size 15~16.9cm
24074 40384 83889 2 Size 17~18.9cm
24075 40385 83891 2 Size 17~18.9cm