SELECT 
  cscart_images.*, 
  cscart_images_links.*, 
  cscart_common_descriptions.description AS alt, 
  cscart_images.image_id AS images_image_id 
FROM 
  cscart_images_links 
  LEFT JOIN cscart_images ON cscart_images_links.detailed_id = cscart_images.image_id 
  LEFT JOIN cscart_common_descriptions ON cscart_common_descriptions.object_id = cscart_images.image_id 
  AND cscart_common_descriptions.object_holder = 'images' 
  AND cscart_common_descriptions.lang_code = 'en' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    14005, 14006, 14007, 13464, 13492, 13998, 
    13999, 14000, 13933, 13934, 13935, 
    14130, 14131, 14132, 13465, 13493, 
    19930, 19931, 14138, 14139, 14133, 
    14134, 14135, 15734, 15735, 15736, 
    15737, 15738, 15739, 15740
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00068

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.167610354,
    "nested_loop": [
      {
        "read_sorted_file": {
          "filesort": {
            "sort_key": "cscart_images_links.position, cscart_images_links.pair_id",
            "table": {
              "table_name": "cscart_images_links",
              "access_type": "range",
              "possible_keys": ["object_id"],
              "key": "object_id",
              "key_length": "81",
              "used_key_parts": ["object_id", "object_type", "type"],
              "loops": 1,
              "rows": 30,
              "cost": 0.07833352,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (14005,14006,14007,13464,13492,13998,13999,14000,13933,13934,13935,14130,14131,14132,13465,13493,19930,19931,14138,14139,14133,14134,14135,15734,15735,15736,15737,15738,15739,15740)"
            }
          }
        }
      },
      {
        "table": {
          "table_name": "cscart_images",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["image_id"],
          "ref": ["u508912950_dev_2025.cscart_images_links.detailed_id"],
          "loops": 30,
          "rows": 1,
          "cost": 0.0366636,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "cscart_common_descriptions",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "108",
          "used_key_parts": ["object_id", "lang_code", "object_holder"],
          "ref": ["u508912950_dev_2025.cscart_images.image_id", "const", "const"],
          "loops": 30,
          "rows": 1,
          "cost": 0.0333868,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_common_descriptions.object_holder = 'images' and cscart_common_descriptions.lang_code = 'en' and trigcond(cscart_images.image_id is not null))"
        }
      }
    ]
  }
}

Result

image_id image_path image_x image_y is_high_res transparent pair_id object_id object_type detailed_id type position alt images_image_id
0 shine-szemhejpuder-duo-02.jpg 1001 1000 N N 21530 13933 product 23315 M 0 23315
0 1-1000x1000-1.jpg 1000 1000 N N 21531 13934 product 23316 M 0 23316
0 shine-szemhejpuder-duo-04.jpg 1001 1000 N N 21532 13935 product 23317 M 0 23317
0 aden_effect_lipstick_satin_01.jpg 1002 1000 N N 21601 13998 product 23386 M 0 23386
0 aden_effect_lipstick_satin_02.jpg 1002 1000 N N 21602 13999 product 23387 M 0 23387
0 aden_effect_lipstick_satin_03.jpg 1002 1000 N N 21603 14000 product 23388 M 0 23388
0 aden_pro_liquid_lipstick_11_burgundy_4-ml_WHITE.jpg 1000 1000 N N 21608 14005 product 23393 M 0 23393
0 aden_pro_liquid_lipstick_14_cranberry_4-ml_WHITE.jpg 1000 1000 N N 21609 14006 product 23394 M 0 23394
0 aden_pro_liquid_lipstick_03_rosie_brown_4-ml_WHITE.jpg 1000 1000 N N 21610 14007 product 23395 M 0 23395
0 WhatsApp_Image_2025-04-08_at_14.18.19__1___1_.png 2048 2048 N N 22198 14133 product 23981 M 0 23981
0 WhatsApp_Image_2025-04-08_at_14.18.21__3_.png 2048 2048 N N 22205 14138 product 23986 M 0 23986
0 WhatsApp_Image_2025-04-08_at_14.18.28__5_.jpeg 2048 1365 N N 24226 15738 product 26000 M 0 26000
0 WhatsApp_Image_2025-04-08_at_14.18.18__1___2_.png 2048 2048 N N 22192 14130 product 23977 M 1 23977
0 WhatsApp_Image_2025-04-08_at_14.18.19__2___1_.png 2048 2048 N N 22201 14134 product 23982 M 1 23982
0 WhatsApp_Image_2025-04-08_at_14.18.19__3___1_.png 2048 2048 N N 22202 14135 product 23983 M 1 23983
0 WhatsApp_Image_2025-04-08_at_14.18.21__1___1_.png 2048 2048 N N 22207 14139 product 23987 M 1 23987
0 WhatsApp_Image_2025-04-11_at_14.53.14__5___1___2_.png 1600 1600 N N 22307 13492 product 24086 M 1 24086
0 WhatsApp_Image_2025-04-11_at_15.29.52__6___1_.png 1600 1600 N N 22308 13464 product 24087 M 1 24087
0 WhatsApp_Image_2025-04-11_at_15.29.52__6___1__c3sm-kl.png 1600 1600 N N 22312 13465 product 24091 M 1 24091
0 WhatsApp_Image_2025-04-11_at_15.29.52__6___1__zver-xf.png 1600 1600 N N 22517 13493 product 24296 M 1 24296
0 WhatsApp_Image_2025-04-08_at_14.18.30__4_.jpeg 2048 1365 N N 24229 15734 product 26001 M 1 26001
0 WhatsApp_Image_2025-04-08_at_14.18.29__4_.jpeg 2048 1365 N N 24230 15735 product 26002 M 1 26002
0 WhatsApp_Image_2025-04-08_at_14.18.28__6_.jpeg 2048 1365 N N 24231 15736 product 26003 M 1 26003
0 WhatsApp_Image_2025-04-08_at_14.18.29__7_.jpeg 2048 1365 N N 24232 15737 product 26004 M 1 26004
0 WhatsApp_Image_2025-04-08_at_14.18.29__6_.jpeg 2048 1365 N N 24233 15739 product 26005 M 1 26005
0 WhatsApp_Image_2025-04-08_at_14.18.29__5_.jpeg 2048 1365 N N 24234 15740 product 26006 M 1 26006
0 WhatsApp_Image_2025-04-08_at_14.18.19.png 2048 1472 N N 22197 14132 product 23980 M 2 23980
0 WhatsApp_Image_2025-04-08_at_14.18.18__2_.jpg 2048 2048 N N 22196 14131 product 23979 M 4 23979