SELECT 
  categories.category_id, 
  categories.parent_id, 
  categories.id_path, 
  category_descriptions.category, 
  categories.position, 
  categories.status, 
  categories.company_id 
FROM 
  categories 
  LEFT JOIN category_descriptions ON categories.category_id = category_descriptions.category_id 
  AND category_descriptions.lang_code = 'en' 
WHERE 
  1 = 1 
  AND (
    categories.usergroup_ids = '' 
    OR FIND_IN_SET(0, categories.usergroup_ids) 
    OR FIND_IN_SET(1, categories.usergroup_ids)
  ) 
  AND categories.status IN ('A') 
  AND categories.level <= 3 
  AND categories.deleted_at IS NULL 
  AND categories.company_id = 143 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.03864

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "1154.22"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "categories",
            "access_type": "ref",
            "possible_keys": [
              "c_status",
              "index_categories_on_deleted_at"
            ],
            "key": "index_categories_on_deleted_at",
            "used_key_parts": [
              "deleted_at"
            ],
            "key_length": "6",
            "ref": [
              "const"
            ],
            "rows_examined_per_scan": 10182,
            "rows_produced_per_join": 33,
            "filtered": "0.33",
            "index_condition": "(`goimagine`.`categories`.`deleted_at` is null)",
            "cost_info": {
              "read_cost": "120.75",
              "eval_cost": "3.39",
              "prefix_cost": "1138.95",
              "data_read_per_join": "88K"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "level",
              "company_id",
              "usergroup_ids",
              "status",
              "position",
              "is_trash",
              "deleted_at"
            ],
            "attached_condition": "((`goimagine`.`categories`.`company_id` = 143) and ((`goimagine`.`categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`goimagine`.`categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`goimagine`.`categories`.`usergroup_ids`))) and (`goimagine`.`categories`.`status` = 'A') and (`goimagine`.`categories`.`level` <= 3))"
          }
        },
        {
          "table": {
            "table_name": "category_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "goimagine.categories.category_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 33,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "11.88",
              "eval_cost": "3.39",
              "prefix_cost": "1154.22",
              "data_read_per_join": "154K"
            },
            "used_columns": [
              "category_id",
              "lang_code",
              "category"
            ]
          }
        }
      ]
    }
  }
}

Result

category_id parent_id id_path category position status company_id
691 683 683/691 Hair Bows / Accessories 0 A 143
688 683 683/688 Face Mask 0 A 143
11344 11334 11334/11344 Anniversary 0 A 143
671 648 645/648/671 Aprons 0 A 143
11335 11334 11334/11335 Baby 0 A 143
682 645 645/682 Baby, Toddler & Kids 0 A 143
681 683 683/681 Baby, Toddler & Kids 0 A 143
678 645 645/678 Bags, Purses, & Wallets 0 A 143
673 653 645/653/673 Bath Towels 0 A 143
675 645 645/675 Beach / Outdoors 0 A 143
676 675 645/675/676 Beach Towels 0 A 143
653 645 645/653 Bed & Bath 0 A 143
699 681 683/681/699 Bibs & Burp Cloths 0 A 143
700 682 645/682/700 Bibs & Burp Cloths 0 A 143
11341 11334 11334/11341 Birthday 0 A 143
647 645 645/647 Blankets, Quilts & Throws 0 A 143
11338 11334 11334/11338 Christmas 0 A 143
662 661 645/661/662 Christmas 0 A 143
680 645 645/680 Clothing 0 A 143
11340 11334 11334/11340 Congrats 0 A 143
701 645 645/701 Cosmetic Accessories 0 A 143
703 701 645/701/703 Cosmetic Bags 0 A 143
694 655 645/655/694 Earrings 0 A 143
695 693 693/695 Earrings 0 A 143
666 661 645/661/666 Easter 0 A 143
11343 11334 11334/11343 Easter 0 A 143
708 682 645/682/708 Fun Activities & Games 0 A 143
12848 675 645/675/12848 Garden 0 A 143
11336 11334 11334/11336 Get Well 0 A 143
692 680 645/680/692 Hair Bows / Accessories 0 A 143
669 661 645/661/669 Halloween 0 A 143
646 645 645/646 Hand Sanitizer Holders 0 A 143
674 653 645/653/674 Hand Towels 0 A 143
689 683 683/689 Hats / Caps / Beanies 0 A 143
690 645 645/690 Hats / Caps / Beanies 0 A 143
661 645 645/661 Holidays 0 A 143
655 645 645/655 Jewelry 0 A 143
667 661 645/661/667 July 4th 0 A 143
658 645 645/658 Key Fobs / Key Rings 0 A 143
648 645 645/648 Kitchen & Dining 0 A 143
702 701 645/701/702 Lip Balm Holders 0 A 143
684 645 645/684 Living & Home Decor 0 A 143
664 661 645/661/664 Mardi Gras 0 A 143
11600 661 645/661/11600 Mother’s Day 0 A 143
696 655 645/655/696 Necklaces 0 A 143
697 693 693/697 Necklaces 0 A 143
665 661 645/661/665 New Years 0 A 143
707 645 645/707 Novelty 0 A 143
660 659 659/660 Tarts 0 A 143
670 648 645/648/670 Tea Towels / Bread Bowl Linens 0 A 143
668 661 645/661/668 Thanksgiving 0 A 143
11337 11334 11334/11337 Thinking of You 0 A 143
11339 11334 11334/11339 Valentine 0 A 143
663 661 645/661/663 Valentine's Day 0 A 143
1190 0 1190 What's New 10 A 143
698 0 698 Bestsellers 20 A 143
1193 0 1193 Sale 25 A 143
683 0 683 Clothing 30 A 143
693 0 693 Jewelry 45 A 143
645 0 645 Embroidery 55 A 143
11334 0 11334 Greeting Cards 56 A 143
11601 0 11601 Ornaments 57 A 143
679 0 679 Personalized 65 A 143
709 0 709 Fun Activities & Games 70 A 143