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 (
    1397, 1399, 1398, 1506, 1449, 1504, 1388, 
    1394, 1377
  ) 
  AND a.status = 'A' 
ORDER BY 
  a.position, 
  a.variant_id

Query time 0.00287

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": 28,
              "filtered": 100,
              "index_condition": "a.option_id in (1397,1399,1398,1506,1449,1504,1388,1394,1377) 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
3745 1398 0 0.000 A 0.000 A 0.000 A A
3747 1399 0 0.000 A 0.000 A 0.000 A A
Viết thiệp 3840 1449 0 0.000 A 0.000 A 0.000 A A
Hộp quà ghi tên (MIỄN PHÍ) 3948 1506 0 0.000 A 0.000 A 0.000 A A
Chữ ký 3681 1377 1 0.000 A 0.000 A 0.000 A A
Chữ ký 3712 1388 1 0.000 A 0.000 A 0.000 A A
Chữ ký 3730 1394 1 0.000 A 0.000 A 0.000 A A
Chữ ký 3739 1397 1 0.000 A 0.000 A 0.000 A A
3744 1398 1 40000.000 A 0.000 A 0.000 A A
3746 1399 1 0.000 A 0.000 A 0.000 A A
Thêu 2 từ (giá gốc 50K, NAY MIỄN PHÍ) 3941 1504 1 0.000 A 0.000 A 0.000 A A
In hoa nét mảnh 3682 1377 2 0.000 A 0.000 A 0.000 A A
In hoa nét mảnh 3713 1388 2 0.000 A 0.000 A 0.000 A A
In hoa nét mảnh 3731 1394 2 0.000 A 0.000 A 0.000 A A
In hoa nét mảnh 3740 1397 2 0.000 A 0.000 A 0.000 A A
Thêu 3 - 4 từ (giá gốc 100K, NAY CHỈ 40K) 3942 1504 2 40000.000 A 0.000 A 0.000 A A
In hoa nét đậm 3683 1377 3 0.000 A 0.000 A 0.000 A A
In hoa nét đậm 3714 1388 3 0.000 A 0.000 A 0.000 A A
In hoa nét đậm 3732 1394 3 0.000 A 0.000 A 0.000 A A
In hoa nét đậm 3741 1397 3 0.000 A 0.000 A 0.000 A A
Viết tay 3684 1377 4 0.000 A 0.000 A 0.000 A A
Viết tay 3715 1388 4 0.000 A 0.000 A 0.000 A A
Viết tay 3733 1394 4 0.000 A 0.000 A 0.000 A A
Viết tay 3742 1397 4 0.000 A 0.000 A 0.000 A A
Viết thường 3685 1377 5 0.000 A 0.000 A 0.000 A A
Viết thường 3716 1388 5 0.000 A 0.000 A 0.000 A A
Viết thường 3734 1394 5 0.000 A 0.000 A 0.000 A A
Viết thường 3743 1397 5 0.000 A 0.000 A 0.000 A A