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 (
    19924, 19922, 20454, 20981, 23924, 23923, 
    19665, 20560, 19630, 22243, 22419, 
    22245, 21925, 20980, 21430, 24704, 
    23479, 21598, 22677, 21915
  ) 
  AND pfv.product_id IN (
    5833, 5835, 3885, 2566, 38146, 38145, 
    6529, 3617, 31786, 534, 286, 25180, 
    1041, 2567, 1835, 46749, 33697, 1532, 
    1838, 1056
  ) 
  AND pfv.lang_code = 'vi'

Query time 0.05295

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": 431,
          "filtered": 0.038125172,
          "attached_condition": "pfv.feature_id in (19924,19922,20454,20981,23924,23923,19665,20560,19630,22243,22419,22245,21925,20980,21430,24704,23479,21598,22677,21915) and pfv.product_id in (5833,5835,3885,2566,38146,38145,6529,3617,31786,534,286,25180,1041,2567,1835,46749,33697,1532,1838,1056) 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
19630 31786 68258 9 Sleep Tight
19665 6529 68389 0 Hộp 100g
19922 5835 69617 0 4 chai
19924 5833 69621 0 4 chai
20454 3885 71556 0 Size 37
20560 3617 71912 0 Trầm Ven
20980 2567 73306 0 Thùng 6 chai
20981 2566 73308 0 Thùng 6 chai
21430 1835 74987 0 Mẫu 5
21598 1532 75524 0 Hũ 120gr
21915 1056 76710 0 Màu cam
21925 1041 76742 0 Nâu, Xanh lá, Cam
22243 534 77936 0 Nâu cam
22245 25180 77943 0 Lục giác - Nâu cam
22419 286 78651 2 Xanh lá mạ
22677 1838 79377 1 Mẫu 1
23479 33697 81479 1 Cúc đỏ
23923 38145 83205 1 Mẫu 1
23924 38146 83207 1 Mẫu 1
24704 46749 86166 2 Nâu đậm