SELECT 
  *, 
  cscart_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path 
FROM 
  cscart_categories 
  LEFT JOIN cscart_category_descriptions ON cscart_category_descriptions.category_id = cscart_categories.category_id 
  AND cscart_category_descriptions.lang_code = 'vi' 
  LEFT JOIN cscart_seo_names ON cscart_seo_names.object_id = 416 
  AND cscart_seo_names.type = 'c' 
  AND cscart_seo_names.dispatch = '' 
  AND cscart_seo_names.lang_code = 'vi' 
WHERE 
  cscart_categories.category_id = 416 
  AND (
    cscart_categories.usergroup_ids = '' 
    OR FIND_IN_SET(
      0, cscart_categories.usergroup_ids
    ) 
    OR FIND_IN_SET(
      1, cscart_categories.usergroup_ids
    )
  )

Query time 0.00372

JSON explain

{
  "query_block": {
    "select_id": 1,
    "const_condition": "1",
    "nested_loop": [
      {
        "table": {
          "table_name": "cscart_categories",
          "access_type": "const",
          "possible_keys": ["PRIMARY", "c_status", "p_category_id"],
          "key": "PRIMARY",
          "key_length": "3",
          "used_key_parts": ["category_id"],
          "ref": ["const"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "table": {
          "table_name": "cscart_category_descriptions",
          "access_type": "const",
          "possible_keys": ["PRIMARY"],
          "key": "PRIMARY",
          "key_length": "9",
          "used_key_parts": ["category_id", "lang_code"],
          "ref": ["const", "const"],
          "rows": 1,
          "filtered": 100
        }
      },
      {
        "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": ["const", "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 level company_id storefront_id usergroup_ids status product_count position timestamp is_op localization age_verification age_limit parent_age_verification parent_age_limit selected_views default_view product_details_view product_columns is_trash is_default category_type google_id svg_icon product_spin_ids lang_code category description meta_keywords meta_description page_title age_warning_message name object_id type dispatch path seo_name seo_path
416 0 416 1 0 0 0 A 1869 2 1725901200 N N 0 N 0 default 0 N N T 0 <svg class="chus_mr-2 icon-gift-collections" width="20" height="20" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"> <g clip-path="url(#clip0_1367_114967)"> <path class="svg-fill-color" d="m49.36 10.04c-4.91-.73-11.76 5.27-14.34 7.75-.45-.47-1.08-.76-1.78-.76h-6.48c-.7 0-1.33.29-1.78.76-2.58-2.47-9.43-8.48-14.34-7.75-1.75.26-3.09 1.29-3.98 3.06-2.22 4.41-2.22 14.86 0 19.27.89 1.77 2.23 2.8 3.98 3.06.18.03.37.03.56.04-3.03 3.36-3.9 7.35-3.95 7.56-.08.39.08.78.4 1.01s.75.25 1.09.05c1.73-1 3.43-1.4 4.49-1.55.04 3.02 1.42 6.66 1.49 6.83.15.39.52.64.93.64h.07c.44-.03.81-.34.91-.77 1.9-8.21 10.82-17.77 13.38-20.38 2.56 2.61 11.48 12.17 13.38 20.38.1.43.47.74.91.77h.07c.41 0 .78-.25.93-.64.07-.17 1.44-3.81 1.49-6.83 1.06.16 2.76.55 4.49 1.55.34.2.77.18 1.09-.05s.47-.63.4-1.01c-.04-.21-.91-4.2-3.95-7.56.19-.01.38-.01.56-.04 1.75-.26 3.09-1.29 3.98-3.06 2.22-4.41 2.22-14.86 0-19.27-.91-1.77-2.25-2.8-4-3.06zm-23.08 9.45c0-.26.21-.47.47-.47h6.48c.26 0 .47.21.47.47v6.48c0 .26-.21.47-.47.47h-6.48c-.26 0-.47-.21-.47-.47zm-17.84 11.98c-1.93-3.84-1.93-13.64 0-17.47.59-1.17 1.41-1.82 2.49-1.98 4.02-.6 10.75 5.25 13.35 7.89v.12c-2.18-1.31-6.19-3.2-9.75-2.07-.53.17-.82.73-.65 1.26s.73.82 1.26.65c3.46-1.1 7.84 1.65 9.15 2.54v.67c-.66.46-2.1 1.38-3.83 2.04-.52.2-.77.78-.58 1.29.15.4.53.64.93.64.12 0 .24-.02.36-.07 1.22-.47 2.29-1.04 3.11-1.54v.12c-2.6 2.64-9.33 8.49-13.35 7.89-1.08-.15-1.9-.8-2.49-1.98zm7.23 14.18c-.32-1.34-.56-2.88-.39-4.06.04-.29-.04-.58-.23-.8s-.47-.34-.76-.34c-.1 0-2.01.01-4.39.9.81-1.99 2.44-4.94 5.46-6.77.01-.01.02-.02.03-.03 3.87-1.67 7.78-5.13 9.59-6.86.45.47 1.08.76 1.78.76h.86c-3.01 3.16-9.18 10.19-11.95 17.2zm30.05-5.2c-.29 0-.57.13-.76.34-.19.22-.28.51-.23.8.17 1.18-.07 2.72-.39 4.06-2.78-7.02-8.95-14.04-11.95-17.2h.86c.7 0 1.33-.29 1.78-.76 1.81 1.73 5.72 5.2 9.59 6.86l.03.03c3.01 1.82 4.65 4.78 5.46 6.77-2.38-.88-4.29-.9-4.39-.9zm5.84-8.98c-.59 1.17-1.41 1.82-2.49 1.98-4.03.6-10.75-5.25-13.35-7.89v-.12c.82.49 1.89 1.07 3.11 1.54.12.05.24.07.36.07.4 0 .78-.24.93-.64.2-.52-.06-1.09-.58-1.29-1.73-.66-3.17-1.59-3.83-2.04v-.68c1.3-.9 5.67-3.65 9.15-2.54.53.17 1.09-.12 1.26-.65s-.12-1.09-.65-1.26c-3.57-1.13-7.57.76-9.75 2.07v-.12c2.6-2.64 9.33-8.49 13.35-7.89 1.09.16 1.9.81 2.49 1.98 1.93 3.85 1.93 13.65 0 17.48z" fill="black"/> </g> <defs> <clipPath id="clip0_1367_114967"> <rect width="16.3168" height="16.6667" fill="white" transform="translate(1.875 1.66675)"/> </clipPath> </defs> </svg> vi Quà tặng sinh nhật Món quà sinh nhật độc lạ trên CHUS. Mua ngay để tạo bất ngờ! qua-tang-sinh-nhat 416 c qua-tang-sinh-nhat