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 (
    2524, 2527, 2525, 2526, 2528, 1134, 827, 
    1139, 1138, 1137, 1136, 1135, 5696, 
    5697, 5698, 5699, 4022, 4021, 4020, 
    2490, 2492, 2494, 2496, 2497, 2698, 
    1406, 1265, 1408, 1411, 1407, 5721, 
    5722, 5723, 1001, 508, 1000, 999, 3090, 
    3091, 3092, 3093, 3094, 5618, 5619, 
    5620, 5621, 4423, 4416, 4420, 4426, 
    4419, 4418, 1266, 1439, 1442, 1447, 
    1445, 1446, 5724, 5725, 5726, 3974, 
    3978, 3976, 3979, 3973
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00312

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "164.86"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "69.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": 69,
            "rows_produced_per_join": 69,
            "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 (2524,2527,2525,2526,2528,1134,827,1139,1138,1137,1136,1135,5696,5697,5698,5699,4022,4021,4020,2490,2492,2494,2496,2497,2698,1406,1265,1408,1411,1407,5721,5722,5723,1001,508,1000,999,3090,3091,3092,3093,3094,5618,5619,5620,5621,4423,4416,4420,4426,4419,4418,1266,1439,1442,1447,1445,1446,5724,5725,5726,3974,3978,3976,3979,3973)))",
            "cost_info": {
              "read_cost": "40.66",
              "eval_cost": "6.90",
              "prefix_cost": "47.56",
              "data_read_per_join": "6K"
            },
            "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": 69,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "17.25",
              "eval_cost": "6.90",
              "prefix_cost": "71.71",
              "data_read_per_join": "53K"
            },
            "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": 69,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "17.25",
              "eval_cost": "6.90",
              "prefix_cost": "95.86",
              "data_read_per_join": "40K"
            },
            "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 Jet_Black.jpg 600 600 N N Y 9054 827 product 9423 M 0 9423
0 Black_847v-40.jpg 600 600 N N Y 9965 1001 product 9520 M 0 9520
0 Jet_Black.jpg 600 600 N N Y 10457 1134 product 9423 M 0 9423
0 Rose_Gold.jpg 600 600 N N Y 10469 1135 product 9422 M 0 9422
0 Gold.jpg 600 600 N N Y 10482 1137 product 9424 M 0 9424
0 Natural.jpg 600 600 N N Y 10494 1138 product 9425 M 0 9425
0 Slate.jpg 600 600 N N Y 10503 1136 product 9426 M 0 9426
0 Silver_tdhu-1r.jpg 600 600 N N Y 10517 1139 product 9421 M 0 9421
0 Black_Gray.jpg 600 600 N N Y 11163 1265 product 10027 M 0 10027
0 Black_Titanium.jpg 600 600 N N Y 11166 1266 product 10030 M 0 10030
0 Sky_Blue.jpg 600 600 N N Y 11777 1408 product 10026 M 0 10026
0 Marble_Gray_seyz-xm.jpg 600 600 N N Y 11787 1411 product 10028 M 0 10028
0 Mint_cgju-pq.jpg 600 600 N N Y 11796 1406 product 10025 M 0 10025
0 Mint_cgju-pq.jpg 600 600 N N Y 11797 1407 product 10025 M 0 10025
0 Yellow_Titanium.jpg 600 600 N N Y 11905 1442 product 10032 M 0 10032
0 Gray_Titanium.jpg 600 600 N N Y 11921 1447 product 10031 M 0 10031
0 Black_Titanium.jpg 600 600 N N Y 11930 1445 product 10030 M 0 10030
0 Black_Titanium.jpg 600 600 N N Y 11931 1446 product 10030 M 0 10030
0 Purple_Titanium.jpg 600 600 N N Y 11935 1439 product 10029 M 0 10029
0 Delivard__11_.jpg 600 600 N N Y 15549 2490 product 11768 M 0 11768
0 Delivard__12__8m3u-5t.jpg 600 600 N N Y 15552 2492 product 11771 M 0 11771
0 Delivard__11__lviw-fq.jpg 600 600 N N Y 15553 2497 product 11772 M 0 11772
0 Delivard__13__wmqr-se.jpg 600 600 N N Y 15555 2496 product 11774 M 0 11774
0 Delivard__14__bbfd-ry.jpg 600 600 N N Y 15557 2494 product 11776 M 0 11776
0 Delivard__28_.jpg 600 600 N N Y 15577 2524 product 11796 M 0 11796
0 Delivard__28__hh66-ui.jpg 600 600 N N Y 15578 2525 product 11797 M 0 11797
0 Delivard__30_.jpg 600 600 N N Y 15581 2527 product 11800 M 0 11800
0 Delivard__31_.jpg 600 600 N N Y 15583 2528 product 11802 M 0 11802
0 Delivard__32_.jpg 600 600 N N Y 15585 2526 product 11804 M 0 11804
0 Untitled_design_-_2025-07-20T111136.581.jpg 600 600 N N Y 17624 3090 product 13215 M 0 13215
0 Untitled_design_-_2025-07-20T111149.998_ccnd-ea.jpg 600 600 N N Y 17629 3091 product 13220 M 0 13220
0 Untitled_design_-_2025-07-20T111208.298_w0pr-x2.jpg 600 600 N N Y 17634 3092 product 13225 M 0 13225
0 Untitled_design_-_2025-07-20T111247.390_zy9q-mz.jpg 600 600 N N Y 17639 3093 product 13230 M 0 13230
0 Untitled_design_-_2025-07-20T111227.245_m3iv-wu.jpg 600 600 N N Y 17644 3094 product 13235 M 0 13235
0 Untitled_design_-_2025-08-04T182608.091.jpg 600 600 N N Y 19423 2698 product 14823 M 0 14823
0 Silver_f15b-7z.jpg 600 600 N N Y 20391 3973 product 15509 M 0 15509
0 Silver_f15b-7z.jpg 600 600 N N Y 20392 3974 product 15509 M 0 15509
0 Silver_f15b-7z.jpg 600 600 N N Y 20394 3976 product 15509 M 0 15509
0 Silver_f15b-7z.jpg 600 600 N N Y 20396 3978 product 15509 M 0 15509
0 Silver_f15b-7z.jpg 600 600 N N Y 20397 3979 product 15509 M 0 15509
0 Delivard_Product_Images_-_2025-05-29T115632.742.jpg 600 600 N N Y 20532 4020 product 15639 M 0 15639
0 Delivard_Product_Images_-_2025-05-29T115632.742.jpg 600 600 N N Y 20533 4021 product 15639 M 0 15639
0 Delivard_Product_Images_-_2025-05-29T115632.742.jpg 600 600 N N Y 20534 4022 product 15639 M 0 15639
0 Space_gray_quhu-9a.jpg 600 600 N N Y 22434 4423 product 16915 M 0 16915
0 Starlight_cmws-cx.jpg 600 600 N N Y 22442 4420 product 16916 M 0 16916
0 Purple_9k14-us.jpg 600 600 N N Y 22459 4426 product 16914 M 0 16914
0 MDEP4.jpeg 1144 1144 N N Y 26138 5618 product 19904 M 0 19904
0 MDEN4.jpeg 1144 1144 N N Y 26141 5620 product 19903 M 0 19903
0 MDEQ4.jpeg 1144 1144 N N Y 26148 5621 product 19905 M 0 19905
0 30_-_2025-09-22T235739.485.jpg 600 600 N N Y 26149 5619 product 19902 M 0 19902
0 30_-_2025-09-23T214125.039.jpg 600 600 N N Y 26292 5696 product 20000 M 0 20000
0 MC2Q4.jpeg 1144 1144 N N Y 26296 5697 product 20001 M 0 20001
0 MC2U4.jpeg 1144 1144 N N Y 26300 5698 product 20002 M 0 20002
0 MC2V4.jpeg 1144 1144 N N Y 26304 5699 product 20003 M 0 20003
0 30_-_2025-09-24T010438.801.jpg 600 600 N N Y 26482 5721 product 20034 M 0 20034
0 MGJ44ref.jpeg 1144 1144 N N Y 26486 5723 product 20035 M 0 20035
0 MGJ64ref.jpeg 1144 1144 N N Y 26487 5722 product 20036 M 0 20036
0 MGHY4.jpeg 1144 1144 N N Y 26497 5725 product 20041 M 0 20041
0 MGJ14.jpeg 1144 1144 N N Y 26500 5726 product 20042 M 0 20042
0 White_rztc-p3.jpg 600 600 N N Y 9272 508 product 9519 M 1 9519
0 White_rztc-p3.jpg 600 600 N N Y 9968 999 product 9519 M 1 9519
0 White_rztc-p3.jpg 600 600 N N Y 9969 1000 product 9519 M 1 9519
0 Blue_g1e8-zy.jpg 600 600 N N Y 22425 4416 product 16913 M 4 16913
0 Blue_g1e8-zy.jpg 600 600 N N Y 22462 4418 product 16913 M 4 16913
0 Blue_g1e8-zy.jpg 600 600 N N Y 22463 4419 product 16913 M 4 16913
0 30_-_2025-09-24T012435.155.jpg 600 600 N N Y 26494 5724 product 20040 M 7 20040