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 (
    232, 786967, 786968, 786969, 786970, 
    786971, 786972, 786973, 786974, 786975, 
    786976, 786977, 786978, 786980
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00045

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.09875276,
    "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": 14,
              "cost": 0.04511496,
              "filtered": 100,
              "index_condition": "cscart_images_links.object_type = 'product' and cscart_images_links.`type` = 'M' and cscart_images_links.object_id in (232,786967,786968,786969,786970,786971,786972,786973,786974,786975,786976,786977,786978,786980)"
            }
          }
        }
      },
      {
        "table": {
          "table_name": "cscart_images",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "4",
          "used_key_parts": ["image_id"],
          "ref": ["u985510652_ecartify_abhi.cscart_images_links.detailed_id"],
          "loops": 14,
          "rows": 1,
          "cost": 0.02071416,
          "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": [
            "u985510652_ecartify_abhi.cscart_images.image_id",
            "const",
            "const"
          ],
          "loops": 14,
          "rows": 1,
          "cost": 0.02399096,
          "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 pair_id object_id object_type detailed_id type position alt images_image_id
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11365 232 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11390 786967 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11391 786968 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11392 786969 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11393 786970 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11394 786971 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11395 786972 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11396 786973 product 13352 M 0 13352
0 2975a2aea5c6eff0731c142852d5edf0cb2d86db.jpg 2500 3125 N 11397 786974 product 13352 M 0 13352
0 WhatsApp_Image_2026-09-01_at_4.11.59_PM.jpeg 1233 1275 N 11453 786976 product 13396 M 0 13396
0 ChatGPT_Image_Sep_8,_2026,_12_57_16_PM.png 1254 1254 N 11464 786980 product 13403 M 0 13403
0 ChatGPT_Image_Sep_8,_2026,_12_50_17_PM.png 1254 1254 N 11458 786975 product 13397 M 1 13397
0 ChatGPT_Image_Sep_8,_2026,_12_53_43_PM.png 1254 1254 N 11459 786977 product 13398 M 1 13398
0 ChatGPT_Image_Sep_8,_2026,_12_55_25_PM.png 1254 1254 N 11460 786978 product 13399 M 1 13399