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 (
    1326, 441, 602, 603, 442, 1032, 1033, 
    439, 1513, 436, 1034, 1035, 1037, 1038
  ) 
  AND a.status = 'A' 
ORDER BY 
  a.position, 
  a.variant_id

Query time 0.00455

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": 41,
              "filtered": 100,
              "index_condition": "a.option_id in (1326,441,602,603,442,1032,1033,439,1513,436,1034,1035,1037,1038) 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à 529 436 0 20000.000 A 0.000 A 0.000 A A
Gói quà 532 439 0 2000.000 A 0.000 A 0.000 A A
Gói quà 534 441 0 20000.000 A 0.000 A 0.000 A A
Gói quà 535 442 0 20000.000 A 0.000 A 0.000 A A
Be mine 906 602 0 0.000 A 0.000 A 0.000 A A
Mean to me 907 602 0 0.000 A 0.000 A 0.000 A A
Call me 908 602 0 0.000 A 0.000 A 0.000 A A
I love you 909 602 0 0.000 A 0.000 A 0.000 A A
Be mine 913 603 0 0.000 A 0.000 A 0.000 A A
Mean to me 914 603 0 0.000 A 0.000 A 0.000 A A
Call me 915 603 0 0.000 A 0.000 A 0.000 A A
I love you 916 603 0 0.000 A 0.000 A 0.000 A A
Gói quà 3959 1513 0 20000.000 A 0.000 A 0.000 A A
Soulmate 2463 1032 1 0.000 A 0.000 A 0.000 A A
Soulmate 2467 1033 1 0.000 A 0.000 A 0.000 A A
Đàn hương 2471 1034 1 0.000 A 0.000 A 0.000 A A
Đàn hương 2475 1035 1 0.000 A 0.000 A 0.000 A A
Laziness 2486 1037 1 0.000 A 0.000 A 0.000 A A
Laziness 2491 1038 1 0.000 A 0.000 A 0.000 A A
Hộp quà cơ bản với thiệp và sticker 3553 1326 1 15000.000 A 0.000 A 0.000 A A
Xoxo 2464 1032 2 0.000 A 0.000 A 0.000 A A
Xoxo 2468 1033 2 0.000 A 0.000 A 0.000 A A
Cà phê 2472 1034 2 0.000 A 0.000 A 0.000 A A
Cà phê 2476 1035 2 0.000 A 0.000 A 0.000 A A
Twilight 2487 1037 2 0.000 A 0.000 A 0.000 A A
Twilight 2492 1038 2 0.000 A 0.000 A 0.000 A A
Hộp quà cơ bản kèm diêm 3554 1326 2 40000.000 A 0.000 A 0.000 A A
Simple Love 2465 1032 3 0.000 A 0.000 A 0.000 A A
Simple Love 2469 1033 3 0.000 A 0.000 A 0.000 A A
Nhài 2473 1034 3 0.000 A 0.000 A 0.000 A A
Nhài 2477 1035 3 0.000 A 0.000 A 0.000 A A
Hygge 2488 1037 3 0.000 A 0.000 A 0.000 A A
Hygge 2493 1038 3 0.000 A 0.000 A 0.000 A A
Hộp quà cơ bản kèm sáp treo 3555 1326 3 70000.000 A 0.000 A 0.000 A A
Without You 2466 1032 4 0.000 A 0.000 A 0.000 A A
Without You 2470 1033 4 0.000 A 0.000 A 0.000 A A
Bưởi 2474 1034 4 0.000 A 0.000 A 0.000 A A
Bưởi 2478 1035 4 0.000 A 0.000 A 0.000 A A
Glamour 2489 1037 4 0.000 A 0.000 A 0.000 A A
Glamour 2494 1038 4 0.000 A 0.000 A 0.000 A A
Delighted 2490 1037 5 0.000 A 0.000 A 0.000 A A
Delighted 2495 1038 5 0.000 A 0.000 A 0.000 A A