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 (
    396006, 396007, 396008, 396009, 396010, 
    396011, 396012, 395983, 395984, 395985, 
    395986, 395987, 395988, 309587, 309588, 
    395989, 395990, 395991, 395992, 395993, 
    395994, 395995, 414436, 414437, 414438, 
    414439, 414440, 414441, 414408, 414409, 
    414410, 414411, 414412, 414413, 414393, 
    414394, 414395, 414396, 414397, 414398, 
    414399, 431514, 431515, 431518, 431521, 
    431524, 431527, 431532, 431535, 431530, 
    431531, 396058, 396059, 396060, 396061, 
    396062, 396063, 396064, 414329, 414330, 
    414331, 414332, 414333, 414334, 396078, 
    396079, 396080, 396081, 396082, 396083, 
    396084, 396085, 396044, 396045, 396046, 
    396047, 396048, 396049, 396050, 431590, 
    431588, 431592, 431594, 431596, 431598, 
    431600, 431602, 431604, 431561, 431589, 
    414422, 414423, 414424, 414425, 414426, 
    414427, 414428, 431659, 431660, 431661, 
    431662, 431663, 431664, 431665, 431666, 
    359772, 309590, 359805, 435519, 309585, 
    309586, 431542, 431543, 431544, 431545, 
    431546, 431547, 431548, 431549, 431550, 
    431551, 431680
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00423

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "707.61"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "122.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_images_links",
            "access_type": "range",
            "possible_keys": [
              "object_id"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type",
              "type"
            ],
            "key_length": "81",
            "rows_examined_per_scan": 122,
            "rows_produced_per_join": 122,
            "filtered": "100.00",
            "index_condition": "((`webmarco`.`cscart_images_links`.`object_type` = 'product') and (`webmarco`.`cscart_images_links`.`type` = 'M') and (`webmarco`.`cscart_images_links`.`object_id` in (396006,396007,396008,396009,396010,396011,396012,395983,395984,395985,395986,395987,395988,309587,309588,395989,395990,395991,395992,395993,395994,395995,414436,414437,414438,414439,414440,414441,414408,414409,414410,414411,414412,414413,414393,414394,414395,414396,414397,414398,414399,431514,431515,431518,431521,431524,431527,431532,431535,431530,431531,396058,396059,396060,396061,396062,396063,396064,414329,414330,414331,414332,414333,414334,396078,396079,396080,396081,396082,396083,396084,396085,396044,396045,396046,396047,396048,396049,396050,431590,431588,431592,431594,431596,431598,431600,431602,431604,431561,431589,414422,414423,414424,414425,414426,414427,414428,431659,431660,431661,431662,431663,431664,431665,431666,359772,309590,359805,435519,309585,309586,431542,431543,431544,431545,431546,431547,431548,431549,431550,431551,431680)))",
            "cost_info": {
              "read_cost": "268.41",
              "eval_cost": "24.40",
              "prefix_cost": "292.81",
              "data_read_per_join": "11K"
            },
            "used_columns": [
              "pair_id",
              "object_id",
              "object_type",
              "image_id",
              "detailed_id",
              "type",
              "position"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_images",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "image_id"
            ],
            "key_length": "4",
            "ref": [
              "webmarco.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 122,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "122.00",
              "eval_cost": "24.40",
              "prefix_cost": "439.21",
              "data_read_per_join": "93K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_common_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "lang_code",
              "object_holder"
            ],
            "key_length": "108",
            "ref": [
              "webmarco.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 122,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "122.00",
              "eval_cost": "24.40",
              "prefix_cost": "585.61",
              "data_read_per_join": "72K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ]
          }
        }
      ]
    }
  }
}

Result

image_id image_path image_x image_y is_high_res pair_id object_id object_type detailed_id type position alt images_image_id
0 Untitled_design_-_2022-09-22T140939.172.png 600 600 N 2726140 309588 product 789212 M 0 789212
0 UPYP0239.JPG 1440 1800 N 2920350 309585 product 927446 M 0 927446
0 TRFL5300_tt3t-dy.JPG 1440 1800 N 2920352 309586 product 927448 M 0 927448
0 IMG_5646.JPG 727 1080 N 2961196 359772 product 943921 M 0 943921
0 IMG_5705.JPG 810 1080 N 2968863 309590 product 944083 M 0 944083
0 IMG_5718.JPG 810 1080 N 2968891 359805 product 944095 M 0 944095
0 IMG_5709.JPG 810 1080 N 2968906 309587 product 944107 M 0 944107
0 Untitled_design_-_2023-04-28T114708.861.png 600 600 N 3647935 395983 product 1361679 M 0 1361679
0 Untitled_design_-_2023-04-28T114708.861.png 600 600 N 3648128 395984 product 1361679 M 0 1361679
0 Untitled_design_-_2023-04-28T114708.861.png 600 600 N 3648129 395985 product 1361679 M 0 1361679
0 Untitled_design_-_2023-04-28T114708.861.png 600 600 N 3648130 395986 product 1361679 M 0 1361679
0 Untitled_design_-_2023-04-28T114708.861.png 600 600 N 3648131 395987 product 1361679 M 0 1361679
0 Untitled_design_-_2023-04-28T114708.861.png 600 600 N 3648132 395988 product 1361679 M 0 1361679
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648325 395989 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648326 395990 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648327 395991 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648328 395992 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648329 395993 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648330 395994 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T122806.880.png 600 600 N 3648331 395995 product 1361680 M 0 1361680
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648822 396006 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648837 396007 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648838 396008 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648839 396009 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648840 396010 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648841 396011 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T125406.146.png 600 600 N 3648842 396012 product 1361683 M 0 1361683
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649415 396044 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649449 396045 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649450 396046 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649451 396047 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649452 396048 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649453 396049 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T140728.205.png 600 600 N 3649454 396050 product 1361700 M 0 1361700
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649528 396058 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649529 396059 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649530 396060 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649531 396061 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649532 396062 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649533 396063 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T142316.241.png 600 600 N 3649534 396064 product 1361706 M 0 1361706
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649712 396078 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649746 396079 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649747 396080 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649748 396081 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649749 396082 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649750 396083 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649751 396084 product 1361714 M 0 1361714
0 Untitled_design_-_2023-04-28T145817.109.png 600 600 N 3649752 396085 product 1361714 M 0 1361714
0 Untitled_design_-_2023-05-01T153457.648.png 600 600 N 3781743 414329 product 1492609 M 0 1492609
0 Untitled_design_-_2023-05-01T153457.648.png 600 600 N 3781744 414330 product 1492609 M 0 1492609
0 Untitled_design_-_2023-05-01T153457.648.png 600 600 N 3781745 414331 product 1492609 M 0 1492609
0 Untitled_design_-_2023-05-01T153457.648.png 600 600 N 3781746 414332 product 1492609 M 0 1492609
0 Untitled_design_-_2023-05-01T153457.648.png 600 600 N 3781747 414333 product 1492609 M 0 1492609
0 Untitled_design_-_2023-05-01T153457.648.png 600 600 N 3781748 414334 product 1492609 M 0 1492609
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781871 414393 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781893 414394 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781894 414395 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781895 414396 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781896 414397 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781897 414398 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T163705.950.png 600 600 N 3781898 414399 product 1492627 M 0 1492627
0 Untitled_design_-_2023-05-01T170629.661.png 600 600 N 3781911 414408 product 1492637 M 0 1492637
0 Untitled_design_-_2023-05-01T170629.661.png 600 600 N 3781912 414409 product 1492637 M 0 1492637
0 Untitled_design_-_2023-05-01T170629.661.png 600 600 N 3781913 414410 product 1492637 M 0 1492637
0 Untitled_design_-_2023-05-01T170629.661.png 600 600 N 3781914 414411 product 1492637 M 0 1492637
0 Untitled_design_-_2023-05-01T170629.661.png 600 600 N 3781915 414412 product 1492637 M 0 1492637
0 Untitled_design_-_2023-05-01T170629.661.png 600 600 N 3781916 414413 product 1492637 M 0 1492637
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781925 414422 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781926 414423 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781927 414424 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781928 414425 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781929 414426 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781930 414427 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T172954.574.png 600 600 N 3781931 414428 product 1492640 M 0 1492640
0 Untitled_design_-_2023-05-01T174543.639.png 600 600 N 3781960 414436 product 1492645 M 0 1492645
0 Untitled_design_-_2023-05-01T174543.639.png 600 600 N 3781979 414437 product 1492645 M 0 1492645
0 Untitled_design_-_2023-05-01T174543.639.png 600 600 N 3781980 414438 product 1492645 M 0 1492645
0 Untitled_design_-_2023-05-01T174543.639.png 600 600 N 3781981 414439 product 1492645 M 0 1492645
0 Untitled_design_-_2023-05-01T174543.639.png 600 600 N 3781982 414440 product 1492645 M 0 1492645
0 Untitled_design_-_2023-05-01T174543.639.png 600 600 N 3781983 414441 product 1492645 M 0 1492645
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870861 431514 product 1543459 M 0 1543459
0 produts_img_600__2__ow8y-qm.png 600 600 N 3870880 431531 product 1543460 M 0 1543460
0 produts_img_600__1__ijl5-gm.png 600 600 N 3870902 431530 product 1543461 M 0 1543461
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870910 431515 product 1543459 M 0 1543459
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870913 431518 product 1543459 M 0 1543459
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870916 431521 product 1543459 M 0 1543459
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870919 431524 product 1543459 M 0 1543459
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870922 431527 product 1543459 M 0 1543459
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870927 431532 product 1543459 M 0 1543459
0 produts_img_600__3__q4w0-d6.png 600 600 N 3870930 431535 product 1543459 M 0 1543459
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871134 431542 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871135 431543 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871136 431544 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871137 431545 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871138 431546 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871139 431547 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871140 431548 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871141 431549 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871142 431550 product 1543471 M 0 1543471
0 produts_img_600__4__sqrt-5w.png 600 600 N 3871143 431551 product 1543471 M 0 1543471
0 produts_img_600__10__gfgm-0t.png 600 600 N 3871179 431561 product 1543476 M 0 1543476
0 produts_img_600__9_.png 600 600 N 3871201 431589 product 1543477 M 0 1543477
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871218 431588 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871220 431590 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871222 431592 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871224 431594 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871226 431596 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871228 431598 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871230 431600 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871232 431602 product 1543473 M 0 1543473
0 produts_img_600__6__t8t5-kk.png 600 600 N 3871234 431604 product 1543473 M 0 1543473
0 produts_img_600__16_.png 600 600 N 3871429 431659 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871438 431660 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871439 431661 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871440 431662 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871441 431663 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871442 431664 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871443 431665 product 1543491 M 0 1543491
0 produts_img_600__16_.png 600 600 N 3871444 431666 product 1543491 M 0 1543491
0 produts_img_600__20__fktq-d8.png 600 600 N 3871469 431680 product 1543499 M 0 1543499
0 IMG_5718.JPG 810 1080 N 4028741 435519 product 944095 M 0 944095