SELECT 
  c.company_id 
FROM 
  cscart_products_categories pc 
  LEFT JOIN cscart_categories c ON c.category_id = pc.category_id 
WHERE 
  pc.product_id = 10434 
GROUP BY 
  c.company_id 
LIMIT 
  2

Query time 0.00386

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "13.60"
    },
    "grouping_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "cost_info": {
        "sort_cost": "4.00"
      },
      "nested_loop": [
        {
          "table": {
            "table_name": "pc",
            "access_type": "ref",
            "possible_keys": [
              "pt"
            ],
            "key": "pt",
            "used_key_parts": [
              "product_id"
            ],
            "key_length": "3",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 4,
            "rows_produced_per_join": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "4.00",
              "eval_cost": "0.80",
              "prefix_cost": "4.80",
              "data_read_per_join": "64"
            },
            "used_columns": [
              "product_id",
              "category_id"
            ]
          }
        },
        {
          "table": {
            "table_name": "c",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY",
              "p_category_id"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "ref": [
              "ea201_francemaqu.pc.category_id"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 4,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "4.00",
              "eval_cost": "0.80",
              "prefix_cost": "9.60",
              "data_read_per_join": "10K"
            },
            "used_columns": [
              "category_id",
              "company_id"
            ]
          }
        }
      ]
    }
  }
}

Result

company_id
1