SELECT 
  jmj_product_sales.product_id, 
  amount AS sales_amount 
FROM 
  jmj_product_sales 
  LEFT JOIN jmj_products_categories ON jmj_products_categories.product_id = jmj_product_sales.product_id 
  AND jmj_products_categories.category_id = jmj_product_sales.category_id 
WHERE 
  jmj_product_sales.product_id IN (
    1592, 1675, 1719, 1636, 1670, 1523, 1538, 
    1683, 1706, 1607
  ) 
  AND jmj_products_categories.link_type = 'M'

Query time 0.01097

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "20.88"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "jmj_product_sales",
          "access_type": "ALL",
          "possible_keys": [
            "PRIMARY",
            "pa"
          ],
          "rows_examined_per_scan": 34,
          "rows_produced_per_join": 9,
          "filtered": "29.41",
          "cost_info": {
            "read_cost": "6.88",
            "eval_cost": "2.00",
            "prefix_cost": "8.88",
            "data_read_per_join": "159"
          },
          "used_columns": [
            "category_id",
            "product_id",
            "amount"
          ],
          "attached_condition": "(`jmj_test`.`jmj_product_sales`.`product_id` in (1592,1675,1719,1636,1670,1523,1538,1683,1706,1607))"
        }
      },
      {
        "table": {
          "table_name": "jmj_products_categories",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY",
            "link_type",
            "pt"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "category_id",
            "product_id"
          ],
          "key_length": "6",
          "ref": [
            "jmj_test.jmj_product_sales.category_id",
            "jmj_test.jmj_product_sales.product_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 9,
          "filtered": "99.62",
          "cost_info": {
            "read_cost": "10.00",
            "eval_cost": "1.99",
            "prefix_cost": "20.88",
            "data_read_per_join": "159"
          },
          "used_columns": [
            "product_id",
            "category_id",
            "link_type"
          ],
          "attached_condition": "(`jmj_test`.`jmj_products_categories`.`link_type` = 'M')"
        }
      }
    ]
  }
}