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 (
    10122, 10127, 10128, 10133, 10217, 10216, 
    10309, 10312, 10315, 10317, 10198, 
    10199, 10200, 10201, 10314, 10319, 
    10320, 10321, 10313, 10316, 10318, 
    10322
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00319

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "52.81"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "22.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": 22,
            "rows_produced_per_join": 22,
            "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 (10122,10127,10128,10133,10217,10216,10309,10312,10315,10317,10198,10199,10200,10201,10314,10319,10320,10321,10313,10316,10318,10322)))",
            "cost_info": {
              "read_cost": "13.21",
              "eval_cost": "2.20",
              "prefix_cost": "15.41",
              "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": 22,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "5.50",
              "eval_cost": "2.20",
              "prefix_cost": "23.11",
              "data_read_per_join": "17K"
            },
            "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": 22,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "5.50",
              "eval_cost": "2.20",
              "prefix_cost": "30.81",
              "data_read_per_join": "13K"
            },
            "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 Delivard_Product_Images_-_2025-12-24T120734.860.jpg 600 600 N N N 40528 10122 product 31326 M 0 31326
0 Delivard_Product_Images_-_2025-12-24T120734.860.jpg 600 600 N N N 40549 10127 product 31326 M 0 31326
0 Delivard_Product_Images_-_2025-12-24T120734.860.jpg 600 600 N N N 40550 10128 product 31326 M 0 31326
0 Delivard_Product_Images_-_2025-12-24T120734.860.jpg 600 600 N N N 40568 10133 product 31326 M 0 31326
0 Product_600_x_600__3_.jpg 600 600 N N N 40749 10198 product 31477 M 0 31477
0 Product_600_x_600__3_.jpg 600 600 N N N 40762 10199 product 31477 M 0 31477
0 Product_600_x_600__3_.jpg 600 600 N N N 40763 10200 product 31477 M 0 31477
0 Product_600_x_600__3_.jpg 600 600 N N N 40764 10201 product 31477 M 0 31477
0 Product_600_x_600__11_.jpg 600 600 N N N 40787 10216 product 31493 M 0 31493
0 Product_600_x_600__11_.jpg 600 600 N N N 40794 10217 product 31493 M 0 31493
0 Product_600_x_600__11_.jpg 600 600 N N N 41086 10309 product 31493 M 0 31493
0 Delivard_Product_Images__89_.jpg 600 600 N N N 41095 10312 product 31727 M 0 31727
0 Delivard_Product_Images__93_.jpg 600 600 N N N 41099 10313 product 31731 M 0 31731
0 Delivard_Product_Images__97_.jpg 600 600 N N N 41103 10314 product 31735 M 0 31735
0 Delivard_Product_Images__89_.jpg 600 600 N N N 41110 10315 product 31727 M 0 31727
0 Delivard_Product_Images__93_.jpg 600 600 N N N 41114 10316 product 31731 M 0 31731
0 Delivard_Product_Images__89_.jpg 600 600 N N N 41118 10317 product 31727 M 0 31727
0 Delivard_Product_Images__93_.jpg 600 600 N N N 41122 10318 product 31731 M 0 31731
0 Delivard_Product_Images__97_.jpg 600 600 N N N 41129 10319 product 31735 M 0 31735
0 Delivard_Product_Images__97_.jpg 600 600 N N N 41130 10320 product 31735 M 0 31735
0 Delivard_Product_Images__97_.jpg 600 600 N N N 41134 10321 product 31735 M 0 31735
0 Delivard_Product_Images__93_.jpg 600 600 N N N 41138 10322 product 31731 M 0 31731