SELECT 
  cscart_categories.category_id, 
  cscart_categories.parent_id, 
  cscart_categories.id_path, 
  cscart_category_descriptions.category, 
  cscart_categories.position, 
  cscart_categories.status, 
  cscart_categories.company_id, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path 
FROM 
  cscart_categories 
  LEFT JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id 
  AND cscart_category_descriptions.lang_code = 'vi' 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = cscart_categories.category_id 
  AND cscart_seo_names.type = 'c' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'vi' 
WHERE 
  1 = 1 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  ) 
  AND cscart_categories.status IN ('A') 
  AND cscart_categories.id_path LIKE '11/%' 
ORDER BY 
  cscart_categories.is_trash asc, 
  cscart_categories.position asc, 
  cscart_category_descriptions.category asc

Query time 0.00070

JSON explain

{
  "query_block": {
    "select_id": 1,
    "filesort": {
      "sort_key": "cscart_categories.is_trash, cscart_categories.position, cscart_category_descriptions.category",
      "temporary_table": {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "ALL",
          "possible_keys": ["c_status", "id_path"],
          "rows": 54,
          "filtered": 35.18518448,
          "attached_condition": "(cscart_categories.usergroup_ids = '' or find_in_set(0,cscart_categories.usergroup_ids) or find_in_set(1,cscart_categories.usergroup_ids)) and cscart_categories.`status` = 'A' and cscart_categories.id_path like '11/%'"
        },
        "table": {
          "table_name": "cscart_category_descriptions",
          "access_type": "eq_ref",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "9",
          "used_key_parts": ["category_id", "lang_code"],
          "ref": ["vietpom_dev.cscart_categories.category_id", "const"],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_category_descriptions.lang_code = 'vi')"
        },
        "table": {
          "table_name": "cscart_seo_names",
          "access_type": "ref",
          "possible_keys": ["PRIMARY", "dispatch"],
          "key": "PRIMARY",
          "key_length": "206",
          "used_key_parts": ["object_id", "type", "dispatch", "lang_code"],
          "ref": [
            "vietpom_dev.cscart_categories.category_id",
            "const",
            "const",
            "const"
          ],
          "rows": 1,
          "filtered": 100,
          "attached_condition": "trigcond(cscart_seo_names.`type` = 'c' and cscart_seo_names.dispatch = '' and cscart_seo_names.lang_code = 'vi')"
        }
      }
    }
  }
}

Result

category_id parent_id id_path category position status company_id seo_name seo_path
75 73 11/73/75 /Sản Phẩm Rửa Xoang Mũi 0 A 0 sn-phm-ra-xoang-mi-vi 11/73
71 11 11/71 Bệnh Truyền Nhiễm 0 A 0 bnh-truyn-nhim 11
78 11 11/78 CSV 0 A 0 csv 11
12 11 11/12 Dị Ứng, Miễn Dịch, Thấp Khớp 0 A 0 d-ng-min-dch-thp-khp 11
14 11 11/14 Gây Mê, Giảm Đau 0 A 0 gay-me-gim-au 11
34 11 11/34 Nhãn Khoa 0 A 0 nhan-khoa 11
37 36 11/36/37 Nhãn Khoa 0 A 0 nhan-khoa 11/36
74 73 11/73/74 Sản Phẩm Rửa Xoang Mũi 0 A 0 sn-phm-ra-xoang-mi 11/73
13 12 11/12/13 SUBSUB1 0 A 0 subsub1-vi 11/12
15 14 11/14/15 SUBSUB2 0 A 0 subsub2-vi 11/14
73 11 11/73 Tai, Mũi, Họng 0 A 0 tai-mi-hng 11
72 71 11/71/72 Thuốc Kháng Sinh 0 A 0 thuc-khang-sinh 11/71
35 34 11/34/35 Điều Trị Khô Mắt 0 A 0 iu-tr-kho-mt 11/34
36 11 11/36 Điều Trị Khô Mắt 0 A 0 iu-tr-kho-mt 11
40 34 11/34/40 Điều Trị Khô MắtViet 0 A 0 iu-tr-kho-mtviet 11/34
41 34 11/34/41 Điều Trị Khô MắtViet 0 A 0 iu-tr-kho-mtviet-vi 11/34
42 34 11/34/42 Điều Trị Khô MắtVietXX 0 A 0 iu-tr-kho-mtvietxx 11/34
43 34 11/34/43 Điều Trị Khô MắtVietXX 0 A 0 iu-tr-kho-mtvietxx-vi 11/34
20 11 11/20 Tim Mạch 10 A 0 tim-mch-vi 11