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 (
    3021, 3022, 3373, 4124, 4125, 2522, 6041, 
    6042, 6043, 6044, 6045, 6046, 6047, 
    2719, 2728, 3593, 3594, 5861, 5860, 
    3385, 3386
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00166

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "50.41"
    },
    "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 (3021,3022,3373,4124,4125,2522,6041,6042,6043,6044,6045,6046,6047,2719,2728,3593,3594,5861,5860,3385,3386)))",
            "cost_info": {
              "read_cost": "12.61",
              "eval_cost": "2.10",
              "prefix_cost": "14.71",
              "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": "22.06",
              "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": "29.41",
              "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 Delivard2_al2b-56.jpg 600 600 N N Y 17054 3021 product 12755 M 0 12755
0 Delivard_m283-y4.jpg 600 600 N N Y 17060 3022 product 12758 M 0 12758
0 Untitled_design_-_2025-07-20T144309.388_df29-q1.jpg 600 600 N N Y 17804 2728 product 13379 M 0 13379
0 Untitled_design__28__y70a-58.jpg 600 600 N N Y 18231 3373 product 13773 M 0 13773
0 Untitled_design_-_2025-07-27T001807.555.jpg 600 600 N N Y 18272 3385 product 13808 M 0 13808
0 Untitled_design_-_2025-07-27T002116.649.jpg 600 600 N N Y 18280 3386 product 13812 M 0 13812
0 Untitled_design__74__hpfc-rr.jpg 600 600 N N Y 19115 3593 product 14563 M 0 14563
0 vnOCnKEpGXyHl7QkLKVhIc8rhAC2IhVuesjBIpsc_chua-sc.jpg 800 800 N N Y 19117 3594 product 14564 M 0 14564
0 Untitled_design_-_2025-08-04T170555.097.jpg 600 600 N N Y 19388 2522 product 14793 M 0 14793
0 2ff9d33faba77cba_PAC003_WHT_Belkin_SOUNDFORM_NanoWirelessEarbudsForKids_WEB_Open.jpg 700 700 N N Y 21153 4124 product 16138 M 0 16138
0 d80789afdba4ee4_PAC003_BLU_Belkin_SOUNDFORM_NanoWirelessEarbudsForKids_WEB_Open.jpg 700 700 N N Y 21157 4125 product 16139 M 0 16139
0 153.jpg 600 600 N N Y 27015 5860 product 20426 M 0 20426
0 687d140e4bbd6.jpg 1600 1062 N N Y 27020 5861 product 20428 M 0 20428
0 30_-_2025-10-01T205249.977.jpg 600 600 N N Y 28260 6041 product 21256 M 0 21256
0 30_-_2025-10-01T205713.375.jpg 600 600 N N Y 28270 6045 product 21261 M 0 21261
0 30_-_2025-10-01T205815.416.jpg 600 600 N N Y 28274 6043 product 21262 M 0 21262
0 0195950310085_z312ntfQ5UMBjk7A3NFOwSyjRhXyTBORjU9lMStw.webp 800 800 N N Y 28284 6047 product 21257 M 0 21257
0 0195950310122_uwn2hGnjyQK0FPd2hpP4CRBuS7Sdlbbjxr6OSOpK.webp 800 800 N N Y 28289 6046 product 21258 M 0 21258
0 apple_watch_series_10_ultramarine_sport_loop.jpg 700 700 N N Y 28291 6042 product 21260 M 0 21260
0 apple_watch_series_10_lake_green_sport_loop.jpg 700 700 N N Y 28299 6044 product 21259 M 0 21259
0 Untitled_design_-_2025-07-20T144006.058.jpg 600 600 N N Y 17794 2719 product 13369 M 2 13369