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 (
    3522, 3523, 10135, 10136, 10137, 10138, 
    6266, 6267, 6268, 6269, 3401, 3402, 
    3023, 3024, 5985, 8264, 6101, 6102, 
    6103, 6104, 6105, 6106, 6107, 6108, 
    6109, 4130, 4131, 4132
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00197

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "67.21"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "28.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": 28,
            "rows_produced_per_join": 28,
            "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 (3522,3523,10135,10136,10137,10138,6266,6267,6268,6269,3401,3402,3023,3024,5985,8264,6101,6102,6103,6104,6105,6106,6107,6108,6109,4130,4131,4132)))",
            "cost_info": {
              "read_cost": "16.81",
              "eval_cost": "2.80",
              "prefix_cost": "19.61",
              "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": 28,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "7.00",
              "eval_cost": "2.80",
              "prefix_cost": "29.41",
              "data_read_per_join": "21K"
            },
            "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": 28,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "7.00",
              "eval_cost": "2.80",
              "prefix_cost": "39.21",
              "data_read_per_join": "16K"
            },
            "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_evvl-aj.jpg 600 600 N N Y 17063 3023 product 12761 M 0 12761
0 Delivard_2vh3-lu.jpg 600 600 N N Y 17069 3024 product 12764 M 0 12764
0 Untitled_design__36__94vg-rl.jpg 600 600 N N Y 18330 3401 product 13860 M 0 13860
0 8xzhiKZa1RJQ9nbum3Dwr9k73wFoaWEiqrZyX3ZX.jpg 800 800 N N Y 18332 3402 product 13861 M 0 13861
0 Untitled_design__48__47fr-uw.jpg 600 600 N N Y 18769 3522 product 14235 M 0 14235
0 paAKt8fxovdHyAl0oUUHgVOAyoMRIkLE1mOSsTvA.jpg 800 800 N N Y 18771 3523 product 14236 M 0 14236
0 e.jpg 600 600 N N Y 21230 4130 product 16203 M 0 16203
0 bk0.jpg 2000 2000 N N Y 21245 4131 product 16210 M 0 16210
0 bl1.jpg 2000 2000 N N Y 21250 4132 product 16215 M 0 16215
0 188.jpg 600 600 N N Y 27841 5985 product 21125 M 0 21125
0 41MJvky4teL._UF1000,1000_QL80_.jpg 1000 1000 N N Y 28541 6105 product 21333 M 0 21333
0 41w5iAUjoTL._UF1000,1000_QL80_.jpg 1000 1000 N N Y 28550 6106 product 21334 M 0 21334
0 61uVib89WuL._UF894,1000_QL80_.jpg 894 894 N N Y 28556 6104 product 21335 M 0 21335
0 61vzKyZLBZL._UF894,1000_QL80_.jpg 894 894 N N Y 28568 6108 product 21336 M 0 21336
0 416q0O3pYxL._UF1000,1000_QL80_.jpg 1000 1000 N N Y 28571 6103 product 21337 M 0 21337
0 MA7G4.jpeg 1144 1144 N N Y 28578 6102 product 21338 M 0 21338
0 MA7H4.jpeg 1144 1144 N N Y 28593 6109 product 21339 M 0 21339
0 MA7J4.jpeg 4000 4000 N N Y 28599 6107 product 21340 M 0 21340
0 30_-_2025-10-07T215439.737.jpg 600 600 N N Y 29613 6266 product 21726 M 0 21726
0 30_-_2025-10-07T215411.745.jpg 600 600 N N Y 29619 6269 product 21727 M 0 21727
0 30_-_2025-10-07T215506.468.jpg 600 600 N N Y 29620 6267 product 21728 M 0 21728
0 30_-_2025-10-07T215532.664.jpg 600 600 N N Y 29624 6268 product 21729 M 0 21729
0 188.jpg 600 600 N N Y 34941 8264 product 21125 M 0 21125
0 Delivard_Product_Images_-_2025-12-24T145458.038.jpg 600 600 N N N 40573 10135 product 31347 M 0 31347
0 Delivard_Product_Images_-_2025-12-24T145458.038.jpg 600 600 N N N 40586 10136 product 31347 M 0 31347
0 Delivard_Product_Images_-_2025-12-24T145458.038.jpg 600 600 N N N 40587 10137 product 31347 M 0 31347
0 Delivard_Product_Images_-_2025-12-24T145458.038.jpg 600 600 N N N 40588 10138 product 31347 M 0 31347
0 30_-_2025-10-02T142635.642.jpg 600 600 N N Y 28529 6101 product 21332 M 1 21332