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 = 'ar' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    1254, 1253, 247, 2109, 2108, 2107, 2112, 
    2111, 2110, 2114, 2113, 2247, 2248, 
    7741, 7740, 10276, 10277, 10278
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00135

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "49.66"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "21.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": 21,
            "rows_produced_per_join": 21,
            "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 (1254,1253,247,2109,2108,2107,2112,2111,2110,2114,2113,2247,2248,7741,7740,10276,10277,10278)))",
            "cost_info": {
              "read_cost": "11.86",
              "eval_cost": "2.10",
              "prefix_cost": "13.96",
              "data_read_per_join": "1K"
            },
            "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": 21,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "5.25",
              "eval_cost": "2.10",
              "prefix_cost": "21.31",
              "data_read_per_join": "16K"
            },
            "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": 21,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "5.25",
              "eval_cost": "2.10",
              "prefix_cost": "28.66",
              "data_read_per_join": "12K"
            },
            "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 5.jpg 600 600 N N Y 10839 1253 product 9707 M 0 9707
0 6.jpg 600 600 N N Y 10842 1254 product 9708 M 0 9708
0 4_dn82-0y.jpg 600 600 N N Y 14242 2107 product 10841 M 0 10841
0 6_3i5t-t1.jpg 600 600 N N Y 14250 2108 product 10843 M 0 10843
0 9_pbbo-eh.jpg 600 600 N N Y 14253 2109 product 10845 M 0 10845
0 4_pehx-ax.jpg 600 600 N N Y 14260 2110 product 10847 M 0 10847
0 6_cony-0l.jpg 600 600 N N Y 14263 2111 product 10849 M 0 10849
0 5_mbw9-6s.jpg 600 600 N N Y 14266 2112 product 10848 M 0 10848
0 4_xf8q-vn.jpg 600 600 N N Y 14269 2113 product 10850 M 0 10850
0 5_9xjj-67.jpg 600 600 N N Y 14271 2114 product 10851 M 0 10851
0 4_yjc8-g2.jpg 600 600 N N Y 14608 2247 product 11166 M 0 11166
0 5_cpmd-xd.jpg 600 600 N N Y 14610 2248 product 11167 M 0 11167
0 5_tqct-lx.jpg 600 600 N N Y 33715 7741 product 25406 M 0 25406
0 Untitled_design__45_.jpg 900 900 N N N 40947 10276 product 31634 M 0 31634
0 image_2025-12-27_030333234.png 800 800 N N N 40956 10277 product 31637 M 0 31637
0 4.jpg 600 600 N N Y 10836 247 product 9706 M 1 9706
0 6_wglw-5h.jpg 600 600 N N Y 33713 7740 product 25407 M 1 25407
0 image_2025-12-27_030645489.png 800 800 N N N 40959 10278 product 31640 M 4 31640