SELECT 
  id_path 
FROM 
  tmall_categories c 
  JOIN tmall_category_vendor_product_count p USING(category_id) 
WHERE 
  p.company_id = 1

Query time 0.00847

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.099972216,
    "nested_loop": [
      {
        "table": {
          "table_name": "c",
          "access_type": "ALL",
          "possible_keys": ["PRIMARY", "p_category_id"],
          "loops": 1,
          "rows": 113,
          "cost": 0.028190165,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "p",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "7",
          "used_key_parts": ["company_id", "category_id"],
          "ref": ["const", "tmall.c.category_id"],
          "loops": 113,
          "rows": 1,
          "cost": 0.071782051,
          "filtered": 100,
          "using_index": true
        }
      }
    ]
  }
}

Result

id_path
167/165
167/168
167/169
167/170
167/171
167/172
166/175/176
166/177/178
166/177/179
166/177/180
166/177/181
166/177/182
166/196/199
166/175/185
166/175/186
166/175/187
166/175/188
166/175/189
166/174/190
166/174/191
166/174/194
166/174/193
166/174/195
166/196/197
166/196/198
166/196/200
167/201
166/175/202
203/211/212
203/204/208
203/204/209
203/204/210
203/211/213
203/211/214
203/215/216
203/215/217
203/215/218
219/220
219/221
219/222
223/224
223/225
223/226
223/227
228/229
228/230
228/231
228/232
166/234/235
166/234/236
166/234/237
166/234/238
166/234/240
241/242
241/243
241/244
245/246
245/247
245/248
245/249
250/251
250/252
250/253
166/254/263/255
293
294