SELECT 
  tmall_tags.tag_id, 
  tmall_tag_links.object_id, 
  tmall_tag_links.object_type, 
  tmall_tags.tag, 
  tmall_tags.status, 
  COUNT(tmall_tag_links.tag_id) as popularity 
FROM 
  tmall_tags 
  LEFT JOIN tmall_tag_links ON tmall_tag_links.tag_id = tmall_tags.tag_id 
WHERE 
  1 
  AND tmall_tag_links.object_type = 'P' 
  AND tmall_tags.status IN ('A') 
  AND tmall_tag_links.object_id = 126 
GROUP BY 
  tmall_tags.tag_id 
ORDER BY 
  tmall_tags.tag asc

Query time 0.00781

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost": 0.002862638,
    "filesort": {
      "sort_key": "tmall_tags.tag",
      "temporary_table": {
        "nested_loop": [
          {
            "table": {
              "table_name": "tmall_tag_links",
              "access_type": "ref",
              "possible_keys": ["PRIMARY", "tag_id", "ids"],
              "key": "PRIMARY",
              "key_length": "6",
              "used_key_parts": ["object_type", "object_id"],
              "ref": ["const", "const"],
              "loops": 1,
              "rows": 1,
              "cost": 0.000928812,
              "filtered": 100,
              "attached_condition": "tmall_tag_links.object_type <=> 'P' and tmall_tag_links.object_id <=> 126 and tmall_tag_links.object_type = 'P'",
              "using_index": true
            }
          },
          {
            "table": {
              "table_name": "tmall_tags",
              "access_type": "eq_ref",
              "possible_keys": ["PRIMARY"],
              "key": "PRIMARY",
              "key_length": "3",
              "used_key_parts": ["tag_id"],
              "ref": ["tmall.tmall_tag_links.tag_id"],
              "loops": 1,
              "rows": 1,
              "cost": 0.001933826,
              "filtered": 100,
              "attached_condition": "tmall_tags.`status` = 'A'"
            }
          }
        ]
      }
    }
  }
}