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 (
    13445, 13473, 13446, 13474, 13447, 13475, 
    13448, 13476, 18508, 18513, 18518, 
    18509, 13449, 13477, 14140, 14141, 
    13450, 13478, 13963, 13964, 13965, 
    13966, 13967, 13968, 13919, 13920, 
    13899, 13900, 13901
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00153

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.163356722,
    "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": 29,
              "cost": 0.07651336,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (13445,13473,13446,13474,13447,13475,13448,13476,18508,18513,18518,18509,13449,13477,14140,14141,13450,13478,13963,13964,13965,13966,13967,13968,13919,13920,13899,13900,13901)"
            }
          }
        }
      },
      {
        "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": 29,
          "rows": 1,
          "cost": 0.03576916,
          "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": 29,
          "rows": 1,
          "cost": 0.03249236,
          "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 aden_cream_camouflage_04_dark_35-gr-.jpg 1000 1000 N N 21489 13899 product 23274 M 0 23274
0 aden_cream_camouflage_02_fair_35-gr.jpg 1000 1000 N N 21490 13900 product 23275 M 0 23275
0 aden_cream_camouflage_01_light_35-gr.jpg 1000 1000 N N 21491 13901 product 23276 M 0 23276
0 color-me-matic-eyeshaper-black.jpg-scaled.jpg 2560 2560 N N 21510 13919 product 23295 M 0 23295
0 color-me-matic-eyeshaper-brown-scaled.jpg 2560 2560 N N 21511 13920 product 23296 M 0 23296
0 color-me-lip-contour-pencil-03-berry-1000-jpg.jpg 1000 1000 N N 21566 13963 product 23351 M 0 23351
0 color-me-lip-contour-pencil-06-blossom-1000x1000-1.jpg 1000 1000 N N 21567 13964 product 23352 M 0 23352
0 color-me-lip-contour-pencil-02-cinamon-1000-jpg.jpg 1000 1000 N N 21568 13965 product 23353 M 0 23353
0 color-me-lip-contour-pencil-05-coral-1000-jpg.jpg 1000 1000 N N 21569 13966 product 23354 M 0 23354
0 color-me-lip-contour-pencil-04-ginger-1000-jpg.jpg 1000 1000 N N 21570 13967 product 23355 M 0 23355
0 lip-contour-pencil-Nude-1000.jpg 1000 1000 N N 21571 13968 product 23356 M 0 23356
0 WhatsApp_Image_2025-04-08_at_14.18.21__2___1_.png 2048 2048 N N 22208 14140 product 23988 M 0 23988
0 mh01-gray_alt1.jpg 1080 1340 N N 29309 18508 product 31064 M 0 31064
0 mh01-gray_alt1.jpg 1080 1340 N N 29310 18509 product 31064 M 0 31064
0 mh01-gray_alt1.jpg 1080 1340 N N 29314 18513 product 31064 M 0 31064
0 mh01-gray_alt1.jpg 1080 1340 N N 29319 18518 product 31064 M 0 31064
0 WhatsApp_Image_2025-04-08_at_14.18.22__3_.png 2048 2048 N N 22210 14141 product 23989 M 1 23989
0 WhatsApp_Image_2025-04-11_at_13.48.09__1__id6e-h8.jpeg 1600 1600 N N 22252 13445 product 24031 M 1 24031
0 WhatsApp_Image_2025-04-11_at_14.30.40.jpeg 1600 1600 N N 22255 13446 product 24034 M 1 24034
0 WhatsApp_Image_2025-04-11_at_14.30.40_a0px-i6.jpeg 1600 1600 N N 22256 13474 product 24035 M 1 24035
0 WhatsApp_Image_2025-04-11_at_14.34.01.jpeg 1600 1600 N N 22257 13447 product 24036 M 1 24036
0 WhatsApp_Image_2025-04-11_at_14.34.01_b818-6q.jpeg 1600 1600 N N 22258 13475 product 24037 M 1 24037
0 WhatsApp_Image_2025-04-11_at_13.48.09__1__fd7a-hh.jpeg 1600 1600 N N 22259 13448 product 24038 M 1 24038
0 WhatsApp_Image_2025-04-11_at_13.48.09__1__hfa2-uw.jpeg 1600 1600 N N 22260 13476 product 24039 M 1 24039
0 WhatsApp_Image_2025-04-11_at_13.43.03__25___1_.png 1600 1600 N N 22264 13449 product 24043 M 1 24043
0 WhatsApp_Image_2025-04-11_at_13.43.03__25___1__zmy3-8g.png 1600 1600 N N 22265 13477 product 24044 M 1 24044
0 WhatsApp_Image_2025-04-11_at_15.17.31.jpeg 1600 1600 N N 22266 13450 product 24045 M 1 24045
0 WhatsApp_Image_2025-04-11_at_15.17.31_q277-p8.jpeg 1600 1600 N N 22267 13478 product 24046 M 1 24046
0 WhatsApp_Image_2025-04-11_at_13.48.09__1__edx4-co.jpeg 1600 1600 N N 22253 13473 product 24032 M 2 24032