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 = 'en' 
WHERE 
  cscart_images_links.object_type = 'product' 
  AND cscart_images_links.type = 'M' 
  AND cscart_images_links.object_id IN (
    13452, 13480, 13453, 13481, 13454, 13482, 
    13455, 13483, 13456, 13484, 13457, 
    13485, 13458, 13486, 13459, 13487
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00033

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.106435551,
    "nested_loop": [
      {
        "read_sorted_file": {
          "filesort": {
            "sort_key": "cscart_images_links.position, cscart_images_links.pair_id",
            "table": {
              "table_name": "cscart_images_links",
              "access_type": "range",
              "possible_keys": ["object_id"],
              "key": "object_id",
              "key_length": "81",
              "used_key_parts": ["object_id", "object_type", "type"],
              "loops": 1,
              "rows": 16,
              "cost": 0.05121288,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (13452,13480,13453,13481,13454,13482,13455,13483,13456,13484,13457,13485,13458,13486,13459,13487)"
            }
          }
        }
      },
      {
        "table": {
          "table_name": "cscart_images",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["image_id"],
          "ref": ["u508912950_dev_2025.cscart_images_links.detailed_id"],
          "loops": 16,
          "rows": 1,
          "cost": 0.02414144,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "cscart_common_descriptions",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "108",
          "used_key_parts": ["object_id", "lang_code", "object_holder"],
          "ref": ["u508912950_dev_2025.cscart_images.image_id", "const", "const"],
          "loops": 16,
          "rows": 1,
          "cost": 0.02086464,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_common_descriptions.object_holder = 'images' and cscart_common_descriptions.lang_code = 'en' and trigcond(cscart_images.image_id is not null))"
        }
      }
    ]
  }
}

Result

image_id image_path image_x image_y is_high_res transparent pair_id object_id object_type detailed_id type position alt images_image_id
0 WhatsApp_Image_2025-04-11_at_15.29.52.jpeg 1600 1600 N N 22270 13452 product 24049 M 1 24049
0 WhatsApp_Image_2025-04-11_at_15.29.52_od51-n6.jpeg 1600 1600 N N 22271 13480 product 24050 M 1 24050
0 WhatsApp_Image_2025-04-11_at_15.29.52_gxzn-kb.jpeg 1600 1600 N N 22272 13453 product 24051 M 1 24051
0 WhatsApp_Image_2025-04-11_at_15.29.52_cnak-p4.jpeg 1600 1600 N N 22273 13481 product 24052 M 1 24052
0 WhatsApp_Image_2025-04-11_at_15.29.52_svcf-n0.jpeg 1600 1600 N N 22290 13454 product 24069 M 1 24069
0 WhatsApp_Image_2025-04-11_at_15.29.52_g48a-d3.jpeg 1600 1600 N N 22291 13482 product 24070 M 1 24070
0 ho_wood__1___1_.png 1600 1600 N N 22292 13455 product 24071 M 1 24071
0 ho_wood__1___1__8bhx-4x.png 1600 1600 N N 22293 13483 product 24072 M 1 24072
0 WhatsApp_Image_2025-04-11_at_15.29.52_e4ms-xx.jpeg 1600 1600 N N 22294 13456 product 24073 M 1 24073
0 WhatsApp_Image_2025-04-11_at_15.29.52_gc2k-iu.jpeg 1600 1600 N N 22295 13484 product 24074 M 1 24074
0 WhatsApp_Image_2025-04-11_at_15.29.52__2___1_.png 1600 1600 N N 22297 13457 product 24076 M 1 24076
0 WhatsApp_Image_2025-04-11_at_15.29.52__2___1__im6x-pv.png 1600 1600 N N 22298 13485 product 24077 M 1 24077
0 WhatsApp_Image_2025-04-11_at_15.29.52__4___1_.png 1600 1600 N N 22299 13458 product 24078 M 1 24078
0 WhatsApp_Image_2025-04-11_at_15.29.52__4___1__uwd7-wk.png 1600 1600 N N 22300 13486 product 24079 M 1 24079
0 WhatsApp_Image_2025-04-11_at_15.29.52__5___1___1_.png 1600 1600 N N 22302 13459 product 24081 M 1 24081
0 WhatsApp_Image_2025-04-11_at_15.29.52__5___1___1__whre-8k.png 1600 1600 N N 22303 13487 product 24082 M 1 24082