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 (
    14130, 14131, 14132, 14138, 14139, 14133, 
    14134, 14135, 15734, 15735, 15736, 
    15737, 15738, 15739, 15740
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00040

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.101350882,
    "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": 15,
              "cost": 0.04857352,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (14130,14131,14132,14138,14139,14133,14134,14135,15734,15735,15736,15737,15738,15739,15740)"
            }
          }
        }
      },
      {
        "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": 15,
          "rows": 1,
          "cost": 0.023247,
          "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": 15,
          "rows": 1,
          "cost": 0.0199702,
          "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-08_at_14.18.19__1___1_.png 2048 2048 N N 22198 14133 product 23981 M 0 23981
0 WhatsApp_Image_2025-04-08_at_14.18.21__3_.png 2048 2048 N N 22205 14138 product 23986 M 0 23986
0 WhatsApp_Image_2025-04-08_at_14.18.28__5_.jpeg 2048 1365 N N 24226 15738 product 26000 M 0 26000
0 WhatsApp_Image_2025-04-08_at_14.18.18__1___2_.png 2048 2048 N N 22192 14130 product 23977 M 1 23977
0 WhatsApp_Image_2025-04-08_at_14.18.19__2___1_.png 2048 2048 N N 22201 14134 product 23982 M 1 23982
0 WhatsApp_Image_2025-04-08_at_14.18.19__3___1_.png 2048 2048 N N 22202 14135 product 23983 M 1 23983
0 WhatsApp_Image_2025-04-08_at_14.18.21__1___1_.png 2048 2048 N N 22207 14139 product 23987 M 1 23987
0 WhatsApp_Image_2025-04-08_at_14.18.30__4_.jpeg 2048 1365 N N 24229 15734 product 26001 M 1 26001
0 WhatsApp_Image_2025-04-08_at_14.18.29__4_.jpeg 2048 1365 N N 24230 15735 product 26002 M 1 26002
0 WhatsApp_Image_2025-04-08_at_14.18.28__6_.jpeg 2048 1365 N N 24231 15736 product 26003 M 1 26003
0 WhatsApp_Image_2025-04-08_at_14.18.29__7_.jpeg 2048 1365 N N 24232 15737 product 26004 M 1 26004
0 WhatsApp_Image_2025-04-08_at_14.18.29__6_.jpeg 2048 1365 N N 24233 15739 product 26005 M 1 26005
0 WhatsApp_Image_2025-04-08_at_14.18.29__5_.jpeg 2048 1365 N N 24234 15740 product 26006 M 1 26006
0 WhatsApp_Image_2025-04-08_at_14.18.19.png 2048 1472 N N 22197 14132 product 23980 M 2 23980
0 WhatsApp_Image_2025-04-08_at_14.18.18__2_.jpg 2048 2048 N N 22196 14131 product 23979 M 4 23979