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 (
    13876, 13877, 13878, 13879, 13880, 13881, 
    13882, 13963, 13964, 13965, 13966, 
    13967, 13968, 13919, 13920, 13899, 
    13900, 13901, 13861, 13862, 13863, 
    13864, 13865, 13971, 13972, 13973, 
    13902, 13903, 13913, 13914, 13915, 
    13947, 13948, 13949
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00051

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.184626138,
    "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": 34,
              "cost": 0.08561416,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (13876,13877,13878,13879,13880,13881,13882,13963,13964,13965,13966,13967,13968,13919,13920,13899,13900,13901,13861,13862,13863,13864,13865,13971,13972,13973,13902,13903,13913,13914,13915,13947,13948,13949)"
            }
          }
        }
      },
      {
        "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": 34,
          "rows": 1,
          "cost": 0.04024136,
          "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": 34,
          "rows": 1,
          "cost": 0.03696456,
          "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_foundation_05_-fudge_15-ml-1.jpg 1000 1000 N N 21372 13861 product 23157 M 0 23157
0 aden_cream_foundation_02_natural_15-ml-1.jpg 1000 1000 N N 21373 13862 product 23158 M 0 23158
0 aden_cream_foundation_01_nude_15-ml-1.jpg 1000 1000 N N 21374 13863 product 23159 M 0 23159
0 aden_cream_foundation_03_terra_cotta_15-ml-1.jpg 1000 1000 N N 21375 13864 product 23160 M 0 23160
0 aden_cream_foundation_07_-porcelain_15-ml.jpg 1000 1000 N N 21376 13865 product 23161 M 0 23161
0 aden_bb_krem_01_300-scaled_y675-1r.jpg 2560 2560 N N 21424 13878 product 23209 M 0 23209
0 bb-cream-collagen.png 4000 4000 N N 21429 13879 product 23214 M 0 23214
0 bb-cream-collagen_8wr9-ja.png 4000 4000 N N 21435 13880 product 23220 M 0 23220
0 bb-cream-collagen_l6bz-z9.png 4000 4000 N N 21441 13881 product 23226 M 0 23226
0 bb-cream-collagen_3xpk-e5.png 4000 4000 N N 21447 13882 product 23232 M 0 23232
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 aden_dipliner_black_45ml.jpg 1000 1000 N N 21492 13902 product 23277 M 0 23277
0 aden_dipliner_brown_45ml.jpg 1000 1000 N N 21493 13903 product 23278 M 0 23278
0 aden_eyeliner_pencil_61_stay_24_hours_pro_longwear_1.2-gr_bx1s-cj.jpg 1000 1000 N N 21504 13913 product 23289 M 0 23289
0 861-ezgif.com-webp-to-jpg-converter.jpg 1400 1400 N N 21505 13914 product 23290 M 0 23290
0 aden_eyeliner_pencil_67_smoky_eyes_velvet_grey_120-gr-.jpg 1000 1000 N N 21506 13915 product 23291 M 0 23291
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 aden_eyebrow_loose_powder_02_brown_07g.jpg 1000 1000 N N 21549 13947 product 23334 M 0 23334
0 aden_eyebrow_loose_powder_01_light_brown_07g.jpg 1000 1000 N N 21550 13948 product 23335 M 0 23335
0 aden_eyebrow_shadow_powder_05_anthrazite.jpg 1000 1000 N N 21551 13949 product 23336 M 0 23336
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 creamy-velvet-lipstick-04.jpg 1000 1000 N N 21574 13971 product 23359 M 0 23359
0 creamy-velvet-lipstick-08.jpg 1000 1000 N N 21575 13972 product 23360 M 0 23360
0 creamy-velvet-lipstick-01.jpg 1000 1000 N N 21576 13973 product 23361 M 0 23361
0 aden_bb_krem_02-300-scaled_84a1-q3.jpg 2560 2560 N N 21683 13877 product 23468 M 0 23468
0 aden_bb_krem_03_300-scaled_4wfs-09.jpg 2560 2560 N N 22011 13876 product 23796 M 0 23796