SELECT 
  b.variant_name, 
  a.* 
FROM 
  cscart_product_option_variants AS a 
  LEFT JOIN cscart_product_option_variants_descriptions AS b ON b.variant_id = a.variant_id 
  AND b.lang_code = 'vi' 
WHERE 
  1 
  AND a.option_id IN (
    1512, 1503, 1505, 1507, 426, 1501, 1508
  ) 
  AND a.status = 'A' 
ORDER BY 
  a.position, 
  a.variant_id

Query time 0.00159

JSON explain

{
  "query_block": {
    "select_id": 1,
    "nested_loop": [
      {
        "read_sorted_file": {
          "filesort": {
            "sort_key": "a.position, a.variant_id",
            "table": {
              "table_name": "a",
              "access_type": "range",
              "possible_keys": ["status", "option_id", "option_id_2"],
              "key": "option_id",
              "key_length": "6",
              "used_key_parts": ["option_id", "status"],
              "rows": 19,
              "filtered": 100,
              "index_condition": "a.option_id in (1512,1503,1505,1507,426,1501,1508) and a.`status` = 'A'"
            }
          }
        }
      },
      {
        "table": {
          "table_name": "b",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "9",
          "used_key_parts": ["variant_id", "lang_code"],
          "ref": ["dev_db.a.variant_id", "const"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(b.lang_code = 'vi')"
        }
      }
    ]
  }
}

Result

variant_name variant_id option_id position modifier modifier_type weight_modifier weight_modifier_type point_modifier point_modifier_type status
Gói quà 519 426 0 20000.000 A 0.000 A 0.000 A A
Gói quà (Miễn Phí) 3934 1501 0 0.000 A 0.000 A 0.000 A A
Hộp quà kèm diêm và thiệp (MIỄN PHÍ) 3954 1508 0 0.000 A 0.000 A 0.000 A A
Miễn phí gói quà 3958 1512 0 0.000 A 0.000 A 0.000 A A
Enchant 3936 1503 1 0.000 A 0.000 A 0.000 A A
Enchant 3943 1505 1 0.000 A 0.000 A 0.000 A A
Enchant 3949 1507 1 0.000 A 0.000 A 0.000 A A
Xanadu 3937 1503 2 0.000 A 0.000 A 0.000 A A
Xanadu 3944 1505 2 0.000 A 0.000 A 0.000 A A
Xanadu 3950 1507 2 0.000 A 0.000 A 0.000 A A
Chillin 3938 1503 3 0.000 A 0.000 A 0.000 A A
Chillin 3945 1505 3 0.000 A 0.000 A 0.000 A A
Chillin 3951 1507 3 0.000 A 0.000 A 0.000 A A
Wooden 3939 1503 4 0.000 A 0.000 A 0.000 A A
Wooden 3946 1505 4 0.000 A 0.000 A 0.000 A A
Wooden 3952 1507 4 0.000 A 0.000 A 0.000 A A
Yuque 3940 1503 5 0.000 A 0.000 A 0.000 A A
Yuque 3947 1505 5 0.000 A 0.000 A 0.000 A A
Yuque 3953 1507 5 0.000 A 0.000 A 0.000 A A