SELECT 
  categories.category_id, 
  categories.parent_id, 
  categories.id_path, 
  category_descriptions.category, 
  categories.position, 
  categories.status, 
  categories.company_id, 
  categories.storefront_id, 
  seo_names.name as seo_name, 
  seo_names.path as seo_path, 
  category_descriptions.mega_m_category_banner_url, 
  category_descriptions.mega_m_category_svg_icon 
FROM 
  categories 
  LEFT JOIN category_descriptions ON categories.category_id = category_descriptions.category_id 
  AND category_descriptions.lang_code = 'en' 
  LEFT JOIN seo_names ON seo_names.object_id = categories.category_id 
  AND seo_names.type = 'c' 
  AND seo_names.dispatch = '' 
  AND seo_names.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.storefront_id IN (0, 1) 
  AND categories.deleted_at IS NULL 
  AND categories.category_id IN(
    2, 
    4, 
    5, 
    8, 
    15, 
    17, 
    18, 
    23, 
    25, 
    26, 
    45, 
    46, 
    47, 
    48, 
    51, 
    52, 
    71, 
    73, 
    76, 
    78, 
    81, 
    82, 
    3, 
    87, 
    91, 
    90, 
    98, 
    100, 
    106, 
    109, 
    112, 
    118, 
    13, 
    131, 
    132, 
    147, 
    169, 
    170, 
    179, 
    186, 
    187, 
    191, 
    194, 
    195, 
    196, 
    197, 
    199, 
    205, 
    257, 
    260, 
    266, 
    99, 
    271, 
    272, 
    278, 
    12, 
    55, 
    305, 
    59, 
    317, 
    319, 
    326, 
    2185, 
    2566, 
    5843, 
    7710, 
    6247, 
    6358, 
    6365, 
    6366, 
    6368, 
    6369, 
    6370, 
    6483, 
    6667, 
    6692, 
    97, 
    6726, 
    40, 
    6738, 
    6739, 
    6817, 
    6866, 
    8498, 
    6903, 
    7221, 
    7265, 
    7266, 
    7405, 
    22740, 
    7651, 
    7695, 
    7712, 
    7713, 
    7714, 
    7905, 
    8031, 
    8443, 
    8488, 
    8489, 
    8499, 
    8694, 
    8695, 
    9148, 
    9321, 
    10161, 
    10163, 
    10333, 
    10334, 
    10335, 
    10336, 
    10409, 
    10482, 
    10812, 
    10853, 
    11350, 
    13321, 
    13356, 
    13357, 
    13358, 
    13359, 
    13579, 
    13628, 
    14094, 
    15094, 
    15466, 
    16173, 
    18857, 
    18877, 
    18878, 
    18879, 
    18880, 
    18881, 
    18886, 
    19509, 
    19514, 
    19515, 
    19803, 
    20143, 
    20302, 
    20611, 
    20955
  ) 
  AND categories.company_id = 2948 
ORDER BY 
  categories.is_trash asc, 
  categories.position asc, 
  category_descriptions.category asc

Query time 0.00926

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "64.11"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "categories",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "p_category_id",
              "index_categories_on_deleted_at"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id"
            ],
            "key_length": "3",
            "rows_examined_per_scan": 142,
            "rows_produced_per_join": 0,
            "filtered": "0.04",
            "cost_info": {
              "read_cost": "64.03",
              "eval_cost": "0.00",
              "prefix_cost": "64.04",
              "data_read_per_join": "133"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "company_id",
              "usergroup_ids",
              "status",
              "position",
              "is_trash",
              "deleted_at",
              "storefront_id"
            ],
            "attached_condition": "((`goimagine`.`categories`.`company_id` = 2948) 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`.`storefront_id` in (0,1)) and (`goimagine`.`categories`.`deleted_at` is null) and (`goimagine`.`categories`.`category_id` in (2,4,5,8,15,17,18,23,25,26,45,46,47,48,51,52,71,73,76,78,81,82,3,87,91,90,98,100,106,109,112,118,13,131,132,147,169,170,179,186,187,191,194,195,196,197,199,205,257,260,266,99,271,272,278,12,55,305,59,317,319,326,2185,2566,5843,7710,6247,6358,6365,6366,6368,6369,6370,6483,6667,6692,97,6726,40,6738,6739,6817,6866,8498,6903,7221,7265,7266,7405,22740,7651,7695,7712,7713,7714,7905,8031,8443,8488,8489,8499,8694,8695,9148,9321,10161,10163,10333,10334,10335,10336,10409,10482,10812,10853,11350,13321,13356,13357,13358,13359,13579,13628,14094,15094,15466,16173,18857,18877,18878,18879,18880,18881,18886,19509,19514,19515,19803,20143,20302,20611,20955)))"
          }
        },
        {
          "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": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.02",
              "eval_cost": "0.00",
              "prefix_cost": "64.06",
              "data_read_per_join": "232"
            },
            "used_columns": [
              "category_id",
              "lang_code",
              "category",
              "mega_m_category_banner_url",
              "mega_m_category_svg_icon"
            ]
          }
        },
        {
          "table": {
            "table_name": "seo_names",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "dispatch"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "type",
              "dispatch",
              "lang_code"
            ],
            "key_length": "206",
            "ref": [
              "goimagine.categories.category_id",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 0,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.04",
              "eval_cost": "0.00",
              "prefix_cost": "64.11",
              "data_read_per_join": "86"
            },
            "used_columns": [
              "name",
              "object_id",
              "company_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        }
      ]
    }
  }
}

Result

category_id parent_id id_path category position status company_id storefront_id seo_name seo_path mega_m_category_banner_url mega_m_category_svg_icon
6817 0 6817 ** NEW ** 0 A 2948 0 new
18879 18877 9148/18877/18879 16 oz. Tumblers 0 A 2948 0 16-oz.-tumblers 9148/18877
18881 18877 9148/18877/18881 18 oz. Tumblers 0 A 2948 0 18-oz.-tumblers 9148/18877
18878 18877 9148/18877/18878 20 oz. Tumblers 0 A 2948 0 20-oz.-tumblers 9148/18877
18880 18877 9148/18877/18880 24 oz. Tumblers 0 A 2948 0 24-oz.-tumblers 9148/18877
6365 5843 5843/6365 3D Animals 0 A 2948 0 3d-animals 5843
10333 5843 5843/10333 3D Word Signs 0 A 2948 0 3d-word-signs 5843
7712 7221 7221/7712 Animal Themed 0 A 2948 0 animal-themed 7221
18857 9148 9148/18857 Assorted Glasses 0 A 2948 0 assorted-glasses 9148
18877 9148 9148/18877 Assorted Tumblers 0 A 2948 0 tumblers 9148
10335 7405 7405/10335 Baby Shower/Gender Reveal 0 A 2948 0 baby-shower-gender-reveal 7405
8443 8498 8498/8443 Beach Themed Items 0 A 2948 0 beach-themed-items 8498
20143 7266 7266/20143 Beaded Jewelry 0 A 2948 0 beaded 7266
13358 13321 13321/13358 Bottle Stopper 0 A 2948 0 bottle-stopper 13321
10812 7266 7266/10812 Bracelets 0 A 2948 0 bracelets 7266
9321 7266 7266/9321 Cabochon Pendants 0 A 2948 0 cabochons 7266
20955 7266 7266/20955 Charm Earrings 0 A 2948 0 charm-earrings 7266
13357 13321 13321/13357 Charms 0 A 2948 0 charms 13321
10334 7405 7405/10334 Christening/Baptism 0 A 2948 0 christening-baptism 7405
8499 6370 6370/8499 Christmas 0 A 2948 0 christmas 6370
6866 6366 6366/6866 Crystal Geode Coasters 0 A 2948 0 crystal-coasters 6366
19803 19515 19515/19803 Decorative Beaded Pens 0 A 2948 0 decorative-beaded-pens 19515
13628 13321 13321/13628 Decorative Pin(s) 0 A 2948 0 decorative-pin-s 13321
7905 7266 7266/7905 Earrings 0 A 2948 0 earrings 7266
13359 13321 13321/13359 Earrings 0 A 2948 0 earrings 13321
6358 7710 7710/6358 Framed Diamond Art 0 A 2948 0 framed-diamond-art 7710
16173 9148 9148/16173 Glassware Sets 0 A 2948 0 10-oz.-highball-glassware-sets 9148
7714 7221 7221/7714 ICE 0 A 2948 0 ice 7221
19514 11350 11350/19514 Keychains 0 A 2948 0 keychains 11350
20611 7266 7266/20611 Kids Beaded Jewelry 0 A 2948 0 kids-beaded-jewelry 7266
10336 7405 7405/10336 Kids Birthday 0 A 2948 0 kids-birthday 7405
8695 7405 7405/8695 Memorial 0 A 2948 0 memorial 7405
10409 9148 9148/10409 Mugs 0 A 2948 0 mugs 9148
10161 8499 6370/8499/10161 Ornaments 0 A 2948 0 ornaments 6370/8499
13356 13321 13321/13356 Pendants 0 A 2948 0 pendants 13321
8031 7266 7266/8031 Pendants 0 A 2948 0 necklaces 7266
19509 11350 11350/19509 Pens 0 A 2948 0 pens-en-13 11350
20302 10163 10163/20302 Prayer Beads 0 A 2948 0 prayer-beads 10163
7713 7221 7221/7713 Ribbons/Awareness 0 A 2948 0 ribbons-awareness 7221
6483 7710 7710/6483 Round Drill Diamond Art 0 A 2948 0 round-drill-diamond-art 7710
8489 6366 6366/8489 Round Geode Coasters 0 A 2948 0 round-geode-coasters 6366
6247 7710 7710/6247 Special Shaped Diamond Art 0 A 2948 0 special-shaped-diamond-art 7710
8488 6366 6366/8488 Square Geode Coasters 0 A 2948 0 square-geode-coasters 6366
7265 6366 6366/7265 Textured Geode Coasters 0 A 2948 0 textured-coasters 6366
6368 5843 5843/6368 Trinket Holders 0 A 2948 0 jewelry-trinket-holders 5843
10482 6370 6370/10482 Valentines Day 0 A 2948 0 valentines-day 6370
6369 5843 5843/6369 Votive / Tealight Holder 0 A 2948 0 votive-holder 5843
18886 9148 9148/18886 Water Bottles 0 A 2948 0 water-bottles 9148
8694 7405 7405/8694 Wedding 0 A 2948 0 wedding 7405
11350 0 11350 **Mature Items** 1 A 2948 0 mature-items
14094 0 14094 **MaryJane** 2 A 2948 0 maryjane
19515 0 19515 Decorative Pens 3 A 2948 0 pens-en-13
15466 0 15466 FreeForm Decorative Bowls 4 A 2948 0 decorative-piece-bowl
10853 0 10853 Games 5 A 2948 0 games-en-3
15094 0 15094 Fidget Spinner 7 A 2948 0 fidget-spinner
7695 0 7695 Unique 8 A 2948 0 unique
10163 0 10163 Religious 9 A 2948 0 religious-en-3
13321 0 13321 Customers Choice 10 A 2948 0 customers-choice
6366 0 6366 Coasters 11 A 2948 0 coaster-square-and-round
7266 0 7266 Jewelry 12 A 2948 0 jewelry-items
7221 0 7221 Keychains 13 A 2948 0 pets-en-2
9148 0 9148 Drinkware 14 A 2948 0 drinkware-en-17
6370 0 6370 Holiday 15 A 2948 0 seasonal-en-7
8498 0 8498 Themed Items 16 A 2948 0 themed-items
7405 0 7405 Occasions 17 A 2948 0 wedding-en-4
7710 0 7710 Diamond Art Variations 18 A 2948 0 diamond-art-variations
5843 0 5843 Handmade Resin Crafts 19 A 2948 0 resin-en
13579 0 13579 Pocket Hugs 56 A 2948 0 pocket-hugs