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 (
    3140, 3141, 1517, 8498, 8497, 1542, 1543, 
    5039, 5038, 4991, 8417, 8419, 8421, 
    8398, 8415, 1609, 1610, 4248, 4247, 
    4246, 4218, 2305, 2304, 4226, 4227, 
    2373, 2374
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00256

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "64.81"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "27.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": 27,
            "rows_produced_per_join": 27,
            "filtered": "100.00",
            "index_condition": "((`softwarepirmam_hewadelivard_cscart_4`.`cscart_images_links`.`object_type` = 'product') and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_images_links`.`type` = 'M') and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_images_links`.`object_id` in (3140,3141,1517,8498,8497,1542,1543,5039,5038,4991,8417,8419,8421,8398,8415,1609,1610,4248,4247,4246,4218,2305,2304,4226,4227,2373,2374)))",
            "cost_info": {
              "read_cost": "16.21",
              "eval_cost": "2.70",
              "prefix_cost": "18.91",
              "data_read_per_join": "2K"
            },
            "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": [
              "softwarepirmam_hewadelivard_cscart_4.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 27,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "6.75",
              "eval_cost": "2.70",
              "prefix_cost": "28.36",
              "data_read_per_join": "20K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res",
              "transparent",
              "cp_in_opt_list"
            ]
          }
        },
        {
          "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": [
              "softwarepirmam_hewadelivard_cscart_4.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 27,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "6.75",
              "eval_cost": "2.70",
              "prefix_cost": "37.81",
              "data_read_per_join": "16K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ]
          }
        }
      ]
    }
  }
}

Result

image_id image_path image_x image_y is_high_res transparent cp_in_opt_list pair_id object_id object_type detailed_id type position alt images_image_id
0 1_pckf-a1.jpg 600 600 N N Y 12152 1517 product 10267 M 0 10267
0 White_wfsk-mv.jpg 600 600 N N Y 12266 1542 product 10299 M 0 10299
0 Silver_weiv-9w.jpg 600 600 N N Y 12268 1543 product 10300 M 0 10300
0 black.jpg 600 600 N N Y 12604 1609 product 10589 M 0 10589
0 white_s6kx-pz.jpg 600 600 N N Y 12606 1610 product 10590 M 0 10590
0 5_xg9x-9g.jpg 600 600 N N Y 14867 2304 product 11363 M 0 11363
0 redmi-10000-mh-600x600.jpg 600 600 N N Y 14872 2305 product 11365 M 0 11365
0 mi-portable-bluetooth-speaker-16w-1_361d19e2-c9b5-4c56-b0a3-c92623c716ab.jpg 1000 1000 N N Y 15026 2373 product 11477 M 0 11477
0 12_wfwa-no.jpg 600 600 N N Y 15030 2374 product 11476 M 0 11476
0 Untitled_design_-_2025-08-04T152618.234.jpg 600 600 N N Y 19340 3140 product 14745 M 0 14745
0 Untitled_design_-_2025-08-04T152520.260_9ykk-sj.jpg 600 600 N N Y 19344 3141 product 14749 M 0 14749
0 4_ks1t-se.jpg 600 600 N N Y 21628 4218 product 16463 M 0 16463
0 Untitled_design_-_2025-08-16T233108.729.jpg 600 600 N N Y 21661 4226 product 16496 M 0 16496
0 Untitled_design_-_2025-08-16T233149.219.jpg 600 600 N N Y 21672 4227 product 16500 M 0 16500
0 productGallery7364.jpg 1500 1500 N N Y 21825 4246 product 16464 M 0 16464
0 c906_pd_32gb雙_2000x2000_03_pk.png 2000 2000 N N Y 21830 4248 product 16465 M 0 16465
0 c906_pd_32gb雙_2000x2000_04_bl.png 2000 2000 N N Y 21832 4247 product 16466 M 0 16466
0 Delivard_Template_jvhk-56.jpg 900 900 N N Y 24512 4991 product 18405 M 0 18405
0 untitled_image_9dzq-72.jpg 900 900 N N Y 35917 8419 product 27521 M 0 27521
0 untitled_image_l1mx-hm.jpg 900 900 N N Y 35932 8421 product 27536 M 0 27536
0 1_pckf-a1.jpg 600 600 N N Y 36013 8497 product 10267 M 0 10267
0 1_pckf-a1.jpg 600 600 N N Y 36014 8498 product 10267 M 0 10267
0 untitled_image_mlca-bb.jpg 900 900 N N Y 35675 8398 product 27324 M 1 27324
0 untitled_image_mlca-bb.jpg 900 900 N N Y 35692 8415 product 27324 M 1 27324
0 untitled_image_q9rd-b0.jpg 900 900 N N Y 35923 8417 product 27527 M 2 27527
0 Delivard_Template__1_.jpg 900 900 N N Y 24795 5038 product 18664 M 4 18664
0 Delivard_Template__5_.jpg 900 900 N N Y 24799 5039 product 18668 M 7 18668