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 (
    13460, 13488, 13461, 13489, 13462, 13490, 
    13463, 13491, 13464, 13492, 13465, 
    13493
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00030

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.086155883,
    "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": 12,
              "cost": 0.04065544,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (13460,13488,13461,13489,13462,13490,13463,13491,13464,13492,13465,13493)"
            }
          }
        }
      },
      {
        "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": 12,
          "rows": 1,
          "cost": 0.02056368,
          "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": 12,
          "rows": 1,
          "cost": 0.01728688,
          "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_14.53.14__5___1___2_.png 1600 1600 N N 22307 13492 product 24086 M 1 24086
0 WhatsApp_Image_2025-04-11_at_15.29.52__6___1_.png 1600 1600 N N 22308 13464 product 24087 M 1 24087
0 WhatsApp_Image_2025-04-11_at_15.29.52__7___1_.png 1600 1600 N N 22309 13460 product 24088 M 1 24088
0 WhatsApp_Image_2025-04-11_at_15.29.52__7___1__w1ts-31.png 1600 1600 N N 22310 13488 product 24089 M 1 24089
0 WhatsApp_Image_2025-04-11_at_15.29.52__7___1__h2r8-ar.png 1600 1600 N N 22311 13462 product 24090 M 1 24090
0 WhatsApp_Image_2025-04-11_at_15.29.52__6___1__c3sm-kl.png 1600 1600 N N 22312 13465 product 24091 M 1 24091
0 WhatsApp_Image_2025-04-11_at_15.29.52__7___1__vuu9-kh.png 1600 1600 N N 22314 13490 product 24093 M 1 24093
0 WhatsApp_Image_2025-04-11_at_15.29.52__7___1__0la5-x2.png 1600 1600 N N 22316 13461 product 24095 M 1 24095
0 WhatsApp_Image_2025-04-11_at_15.29.52__7___1__xq2h-hu.png 1600 1600 N N 22317 13489 product 24096 M 1 24096
0 WhatsApp_Image_2025-04-11_at_14.53.14__5___1___1___3___1_.png 1600 1600 N N 22319 13463 product 24098 M 1 24098
0 WhatsApp_Image_2025-04-11_at_14.53.14__5___1___1___3_.png 1600 1600 N N 22320 13491 product 24099 M 1 24099
0 WhatsApp_Image_2025-04-11_at_15.29.52__6___1__zver-xf.png 1600 1600 N N 22517 13493 product 24296 M 1 24296