SELECT 
  `F`.`path`, 
  `PI`.`product_id`, 
  `PI`.`alt` 
FROM 
  `cscart_products__images` AS `PI` 
  LEFT JOIN `files` AS `F` ON `PI`.`watermark_small_file_id` = `F`.`id` 
WHERE 
  `PI`.`product_id` IN ('14253')

Query time 0.00031

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1.07"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "PI",
          "access_type": "ref",
          "possible_keys": [
            "product_id"
          ],
          "key": "product_id",
          "used_key_parts": [
            "product_id"
          ],
          "key_length": "3",
          "ref": [
            "const"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.25",
            "eval_cost": "0.10",
            "prefix_cost": "0.35",
            "data_read_per_join": "32"
          },
          "used_columns": [
            "product_id",
            "watermark_small_file_id",
            "alt"
          ]
        }
      },
      {
        "table": {
          "table_name": "F",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "id"
          ],
          "key_length": "4",
          "ref": [
            "dev2.PI.watermark_small_file_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 1,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "0.62",
            "eval_cost": "0.10",
            "prefix_cost": "1.07",
            "data_read_per_join": "3K"
          },
          "used_columns": [
            "id",
            "path"
          ]
        }
      }
    ]
  }
}

Result

path product_id alt
https://s3.timeweb.cloud/482029f9-prod/products__images/14253_52958afc5b0b_vax_3th7-zp_df5z-mf.webp 14253