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_reviews' 
  AND cscart_images_links.type = 'A' 
  AND cscart_images_links.object_id IN (
    24025, 25399, 25783, 26918, 23654, 26732, 
    26573, 26460, 26453, 26419
  ) 
ORDER BY 
  cscart_images_links.position, 
  cscart_images_links.pair_id

Query time 0.00058

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "50.65"
    },
    "ordering_operation": {
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "11.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_images_links",
            "access_type": "range",
            "possible_keys": [
              "object_id",
              "idx_object_type_type_position"
            ],
            "key": "object_id",
            "used_key_parts": [
              "object_id",
              "object_type",
              "type"
            ],
            "key_length": "81",
            "rows_examined_per_scan": 11,
            "rows_produced_per_join": 11,
            "filtered": "100.00",
            "index_condition": "((`cscart_db`.`cscart_images_links`.`object_type` = 'product_reviews') and (`cscart_db`.`cscart_images_links`.`type` = 'A') and (`cscart_db`.`cscart_images_links`.`object_id` in (24025,25399,25783,26918,23654,26732,26573,26460,26453,26419)))",
            "cost_info": {
              "read_cost": "18.47",
              "eval_cost": "1.10",
              "prefix_cost": "19.57",
              "data_read_per_join": "1K"
            },
            "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": [
              "cscart_db.cscart_images_links.detailed_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 11,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "9.20",
              "eval_cost": "1.10",
              "prefix_cost": "29.88",
              "data_read_per_join": "8K"
            },
            "used_columns": [
              "image_id",
              "image_path",
              "image_x",
              "image_y",
              "is_high_res"
            ]
          }
        },
        {
          "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": "107",
            "ref": [
              "cscart_db.cscart_images.image_id",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 11,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "8.67",
              "eval_cost": "1.10",
              "prefix_cost": "39.65",
              "data_read_per_join": "6K"
            },
            "used_columns": [
              "object_id",
              "description",
              "lang_code",
              "object_holder"
            ],
            "attached_condition": "<if>(is_not_null_compl(cscart_common_descriptions), (`cscart_db`.`cscart_common_descriptions`.`object_id` = `cscart_db`.`cscart_images`.`image_id`), true)"
          }
        }
      ]
    }
  }
}

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 IMG_20251221_145618217.jpg 4096 3072 N 210337 25399 product_reviews 211612 A 1 211612
0 IMG_4237.jpeg 4032 3024 N 211239 25783 product_reviews 212514 A 1 212514
0 WhatsApp_Image_2026-02-13_at_7.47.23_PM_xr62-0f.jpeg 899 1599 N 214654 26453 product_reviews 215929 A 1 215929
0 image_mg4f-cf.jpg 3264 2448 N 215343 26732 product_reviews 216618 A 1 216618
0 IMG_4237_i3ex-m5.jpeg 4032 3024 N 211240 25783 product_reviews 212515 A 2 212515