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 (
    2623, 2624, 2626, 2729, 2730, 2731, 2732, 
    2102, 2101, 2100, 2099, 2098, 2761, 
    2762, 2763, 2764, 2702, 2703, 2455, 
    8488, 8487, 8486, 4085, 4086, 4087, 
    4088, 4058, 4059, 4134, 5041, 5037
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00191

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "74.41"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "31.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": 31,
            "rows_produced_per_join": 31,
            "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 (2623,2624,2626,2729,2730,2731,2732,2102,2101,2100,2099,2098,2761,2762,2763,2764,2702,2703,2455,8488,8487,8486,4085,4086,4087,4088,4058,4059,4134,5041,5037)))",
            "cost_info": {
              "read_cost": "18.61",
              "eval_cost": "3.10",
              "prefix_cost": "21.71",
              "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": 31,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "7.75",
              "eval_cost": "3.10",
              "prefix_cost": "32.56",
              "data_read_per_join": "23K"
            },
            "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": 31,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "7.75",
              "eval_cost": "3.10",
              "prefix_cost": "43.41",
              "data_read_per_join": "18K"
            },
            "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 4_nthp-mf.jpg 600 600 N N Y 14200 2098 product 10831 M 0 10831
0 7_hy9l-64.jpg 600 600 N N Y 14207 2101 product 10834 M 0 10834
0 6_i9bc-or.jpg 600 600 N N Y 14210 2100 product 10833 M 0 10833
0 9_mug2-b5.jpg 600 600 N N Y 14216 2102 product 10835 M 0 10835
0 5_4rx7-wr.jpg 600 600 N N Y 14217 2099 product 10832 M 0 10832
0 Xiaomi_TV_A_Pro_2025.jpg 750 750 N N Y 15268 2455 product 11602 M 0 11602
0 Delivard_ovt2-ot.jpg 600 600 N N Y 15754 2623 product 11883 M 0 11883
0 Delivard_ovt2-ot.jpg 600 600 N N Y 15755 2624 product 11883 M 0 11883
0 Delivard_8v6d-7l.jpg 600 600 N N Y 15933 2626 product 12007 M 0 12007
0 Delivard_Product_Images__14_.jpg 600 600 N N Y 16236 2729 product 12191 M 0 12191
0 w2abR0ZyRnzZm564vxiKFd2b01TMCu9JVekilJ8G.webp 800 800 N N Y 16241 2731 product 12192 M 0 12192
0 qUwo97QJVUOMvZk04pYB6KWy8kivmuqogiWLlXhq.webp 800 800 N N Y 16245 2732 product 12193 M 0 12193
0 OVK803Ho2030GBcknPnc9JgxlTuTamgW1YN8VA4m.webp 800 800 N N Y 16246 2730 product 12194 M 0 12194
0 Delivard_Product_Images__25_.jpg 600 600 N N Y 16543 2761 product 12430 M 0 12430
0 02.JBL_Live_670NC_Product_Image_Front_Black.png 1605 1605 N N Y 16548 2763 product 12431 M 0 12431
0 02.JBL_Live_670NC_Product_Image_Front_Blue.png 680 680 N N Y 16552 2764 product 12432 M 0 12432
0 02.JBL_Live_670NC_Product_Image_Front_White.png 680 680 N N Y 16553 2762 product 12433 M 0 12433
0 Untitled_design_-_2025-08-04T184925.896.jpg 600 600 N N Y 19428 2702 product 14828 M 0 14828
0 Untitled_design_-_2025-08-04T184949.041_fgwm-xt.jpg 600 600 N N Y 19430 2703 product 14830 M 0 14830
0 Untitled_design_-_2025-08-12T135713.202.jpg 600 600 N N Y 20637 4058 product 15723 M 0 15723
0 Untitled_design_-_2025-08-12T135734.625.jpg 600 600 N N Y 20645 4059 product 15726 M 0 15726
0 Untitled_design_-_2025-08-12T180432.360.jpg 600 600 N N Y 20721 4087 product 15785 M 0 15785
0 Untitled_design_-_2025-08-12T180156.525.jpg 600 600 N N Y 20723 4086 product 15786 M 0 15786
0 Untitled_design_-_2025-08-12T180500.804.jpg 600 600 N N Y 20728 4088 product 15787 M 0 15787
0 Delivard_Product_Images_-_2025-08-13T111730.412_ixrz-g5.jpg 600 600 N N Y 20828 4085 product 15869 M 0 15869
0 Untitled_design_-_2025-08-13T191656.615.jpg 600 600 N N Y 21275 4134 product 16229 M 0 16229
0 m1.jpg 900 900 N N Y 24681 5037 product 18559 M 0 18559
0 bl1.jpg 900 900 N N Y 24703 5041 product 18572 M 0 18572
0 Xiaomi_TV_A_Pro_2025.jpg 750 750 N N Y 35974 8486 product 11602 M 0 11602
0 Xiaomi_TV_A_Pro_2025.jpg 750 750 N N Y 35975 8487 product 11602 M 0 11602
0 Xiaomi_TV_A_Pro_2025.jpg 750 750 N N Y 35976 8488 product 11602 M 0 11602