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 (1273, 1274) 
  AND a.status = 'A' 
ORDER BY 
  a.position, 
  a.variant_id

Query time 0.00249

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": 24,
              "filtered": 100,
              "index_condition": "a.option_id in (1273,1274) 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
Size 1: 13mm 3366 1273 1 0.000 A 0.000 A 0.000 A A
Khắc laser mặt trong 3386 1274 1 150000.000 A 0.000 A 0.000 A A
Size 2: 13.6mm 3367 1273 2 0.000 A 0.000 A 0.000 A A
Khắc laser mặt ngoài 3387 1274 2 250000.000 A 0.000 A 0.000 A A
Size 3: 14mm 3368 1273 3 0.000 A 0.000 A 0.000 A A
Khắc 2 mặt nhẫn 3388 1274 3 400000.000 A 0.000 A 0.000 A A
Size 4: 14.2mm 3369 1273 4 0.000 A 0.000 A 0.000 A A
Không khắc mặt nhẫn 3389 1274 4 0.000 A 0.000 A 0.000 A A
Size 5: 14.6mm 3370 1273 5 0.000 A 0.000 A 0.000 A A
Size 6: 15mm 3371 1273 6 0.000 A 0.000 A 0.000 A A
Size 7: 15.2mm 3372 1273 7 0.000 A 0.000 A 0.000 A A
Size 8: 15.6mm 3373 1273 8 0.000 A 0.000 A 0.000 A A
Size 9: 16mm 3374 1273 9 0.000 A 0.000 A 0.000 A A
Size 10: 16.2mm 3375 1273 10 0.000 A 0.000 A 0.000 A A
Size 11: 16.6mm 3376 1273 11 0.000 A 0.000 A 0.000 A A
Size 12: 17mm 3377 1273 12 0.000 A 0.000 A 0.000 A A
Size 13: 17.2mm 3378 1273 13 0.000 A 0.000 A 0.000 A A
Size 14: 17.6mm 3379 1273 14 0.000 A 0.000 A 0.000 A A
Size 15: 18mm 3380 1273 15 0.000 A 0.000 A 0.000 A A
Size 16: 18.2mm 3381 1273 16 0.000 A 0.000 A 0.000 A A
Size 17: 18.6mm 3382 1273 17 0.000 A 0.000 A 0.000 A A
Size 18: 19mm 3383 1273 18 0.000 A 0.000 A 0.000 A A
Size 19: 19.2mm 3384 1273 19 0.000 A 0.000 A 0.000 A A
Size 20: 19.6mm 3385 1273 20 0.000 A 0.000 A 0.000 A A