SELECT 
  company_id, 
  cscart_vendor_plans.plan_id 
FROM 
  cscart_companies 
  INNER JOIN cscart_vendor_plans ON cscart_companies.plan_id = cscart_vendor_plans.plan_id

Query time 0.00028

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "4.88"
    },
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_companies",
          "access_type": "ALL",
          "rows_examined_per_scan": 2,
          "rows_produced_per_join": 2,
          "filtered": "100.00",
          "cost_info": {
            "read_cost": "2.08",
            "eval_cost": "0.40",
            "prefix_cost": "2.48",
            "data_read_per_join": "12K"
          },
          "used_columns": [
            "company_id",
            "plan_id"
          ]
        }
      },
      {
        "table": {
          "table_name": "cscart_vendor_plans",
          "access_type": "eq_ref",
          "possible_keys": [
            "PRIMARY"
          ],
          "key": "PRIMARY",
          "used_key_parts": [
            "plan_id"
          ],
          "key_length": "4",
          "ref": [
            "atulecarter_march_setup_2025.cscart_companies.plan_id"
          ],
          "rows_examined_per_scan": 1,
          "rows_produced_per_join": 2,
          "filtered": "100.00",
          "using_index": true,
          "cost_info": {
            "read_cost": "2.00",
            "eval_cost": "0.40",
            "prefix_cost": "4.88",
            "data_read_per_join": "192"
          },
          "used_columns": [
            "plan_id"
          ]
        }
      }
    ]
  }
}

Result

company_id plan_id
1 3
2 2