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_categories.storefront_id, 
  cscart_categories.product_count, 
  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 = 'en' 
  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 = 'en' 
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 '5585/8860/%' 
  AND cscart_categories.storefront_id IN (0, 1) 
ORDER BY 
  cscart_categories.is_trash asc, 
  cscart_categories.position asc, 
  cscart_category_descriptions.category asc

Query time 0.00467

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "179.11"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "range",
            "possible_keys": [
              "c_status",
              "id_path"
            ],
            "key": "id_path",
            "used_key_parts": [
              "id_path"
            ],
            "key_length": "767",
            "rows_examined_per_scan": 123,
            "rows_produced_per_join": 2,
            "filtered": "2.00",
            "index_condition": "(`webmarco`.`cscart_categories`.`id_path` like '5585/8860/%')",
            "cost_info": {
              "read_cost": "172.72",
              "eval_cost": "0.49",
              "prefix_cost": "173.21",
              "data_read_per_join": "14K"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "company_id",
              "usergroup_ids",
              "status",
              "product_count",
              "position",
              "is_trash",
              "storefront_id"
            ],
            "attached_condition": "(((`webmarco`.`cscart_categories`.`usergroup_ids` = '') or find_in_set(0,`webmarco`.`cscart_categories`.`usergroup_ids`) or find_in_set(1,`webmarco`.`cscart_categories`.`usergroup_ids`)) and (`webmarco`.`cscart_categories`.`status` = 'A') and (`webmarco`.`cscart_categories`.`storefront_id` in (0,1)))"
          }
        },
        {
          "table": {
            "table_name": "cscart_category_descriptions",
            "access_type": "eq_ref",
            "possible_keys": [
              "PRIMARY"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "category_id",
              "lang_code"
            ],
            "key_length": "9",
            "ref": [
              "webmarco.cscart_categories.category_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.46",
              "eval_cost": "0.49",
              "prefix_cost": "176.16",
              "data_read_per_join": "10K"
            },
            "used_columns": [
              "category_id",
              "lang_code",
              "category"
            ]
          }
        },
        {
          "table": {
            "table_name": "cscart_seo_names",
            "access_type": "ref",
            "possible_keys": [
              "PRIMARY",
              "dispatch"
            ],
            "key": "PRIMARY",
            "used_key_parts": [
              "object_id",
              "type",
              "dispatch",
              "lang_code"
            ],
            "key_length": "206",
            "ref": [
              "webmarco.cscart_categories.category_id",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 2,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "2.46",
              "eval_cost": "0.49",
              "prefix_cost": "179.11",
              "data_read_per_join": "4K"
            },
            "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 product_count seo_name seo_path
9546 8860 5585/8860/9546 Cat SuppliesCat Litter 0 A 0 0 2 cat-suppliescat-litter 5585/8860
6314 6284 5585/8860/6284/6314 Cat Beds 10 A 0 0 1 cat-beds-en 5585/8860/6284
6327 6319 5585/8860/6284/6319/6327 Non-prescription Cat Food 10 A 0 0 0 non-prescription-cat-food-en 5585/8860/6284/6319
6559 6423 5585/8860/6423/6559 Aquarium & Pond Tubing 10 A 0 0 0 aquarium-and-pond-tubing 5585/8860/6423
8862 8861 5585/8860/8861/8862 Bird Cage Accessories 10 A 0 0 0 bird-cage-accessories 5585/8860/8861
8863 8862 5585/8860/8861/8862/8863 Bird Cage Bird Baths 10 A 0 0 0 bird-cage-bird-baths 5585/8860/8861/8862
8861 8860 5585/8860/8861 Bird Supplies 10 A 0 0 6 bird-supplies 5585/8860
6298 6284 5585/8860/6284/6298 Cat Apparel 10 A 0 0 0 cat-apparel-en 5585/8860/6284
6319 6284 5585/8860/6284/6319 Cat Food 10 A 0 0 0 cat-food-en 5585/8860/6284
6348 6284 5585/8860/6284/6348 Cat Furniture 10 A 0 0 0 cat-furniture-en 5585/8860/6284
6357 6284 5585/8860/6284/6357 Cat Furniture Accessories 10 A 0 0 0 cat-furniture-accessories-en 5585/8860/6284
6362 6284 5585/8860/6284/6362 Cat Litter 10 A 0 0 0 cat-litter-en 5585/8860/6284
6373 6284 5585/8860/6284/6373 Cat Litter Box Liners 10 A 0 0 0 cat-litter-box-liners-en 5585/8860/6284
6381 6284 5585/8860/6284/6381 Cat Litter Box Mats 10 A 0 0 0 cat-litter-box-mats-en 5585/8860/6284
6394 6284 5585/8860/6284/6394 Cat Litter Boxes 10 A 0 0 0 cat-litter-boxes-en 5585/8860/6284
6284 8860 5585/8860/6284 Cat Supplies 10 A 0 0 18 cat-supplies-en 5585/8860
6400 6284 5585/8860/6284/6400 Cat Toys 10 A 0 0 0 cat-toys-en 5585/8860/6284
6176 6166 5585/8860/6166/6176 Dog Apparel 10 A 0 0 1 dog-apparel 5585/8860/6166
6326 6312 5585/8860/6166/6312/6326 Non-prescription Dog Food 10 A 0 0 4 non-prescription-dog-food-5 5585/8860/6166/6312
8898 8897 5585/8860/8897/8898 Pet Combs & Brushes 10 A 0 0 0 pet-combs-and-brushes 5585/8860/8897
8880 8879 5585/8860/8879/8880 Pet Glucose Meters 10 A 0 0 0 pet-glucose-meters 5585/8860/8879
8921 8920 5585/8860/8920/8921 Pet Training Clickers & Treat Dispensers 10 A 0 0 0 pet-training-clickers-and-treat-dispensers 5585/8860/8920
6338 6319 5585/8860/6284/6319/6338 Prescription Cat Food 10 A 0 0 0 prescription-cat-food-en 5585/8860/6284/6319
8930 8929 5585/8860/8929/8930 Reptile & Amphibian Food 10 A 0 0 0 reptile-and-amphibian-food 5585/8860/8929
8936 8935 5585/8860/8935/8936 Small Animal Bedding 10 A 0 0 0 small-animal-bedding 5585/8860/8935
6351 6312 5585/8860/6166/6312/6351 Prescription Dog Food 20 A 0 0 0 prescription-dog-food 5585/8860/6166/6312
6654 6423 5585/8860/6423/6654 Aquarium Air Stones & Diffusers 20 A 0 0 0 aquarium-air-stones-and-diffusers 5585/8860/6423
8864 8862 5585/8860/8861/8862/8864 Bird Cage Food & Water Dishes 20 A 0 0 0 bird-cage-food-and-water-dishes 5585/8860/8861/8862
8865 8861 5585/8860/8861/8865 Bird Cages & Stands 20 A 0 0 3 bird-cages-and-stands 5585/8860/8861
6412 6284 5585/8860/6284/6412 Cat Treats 20 A 0 0 0 cat-treats-en 5585/8860/6284
6210 6166 5585/8860/6166/6210 Dog Beds 20 A 0 0 37 dog-beds 5585/8860/6166
6423 8860 5585/8860/6423 Fish Supplies 20 A 0 0 1 fish-supplies 5585/8860
8899 8897 5585/8860/8897/8899 Pet Fragrances & Deodorizing Sprays 20 A 0 0 48 pet-fragrances-and-deodorizing-sprays 5585/8860/8897
8881 8879 5585/8860/8879/8881 Pet Pedometers 20 A 0 0 0 pet-pedometers 5585/8860/8879
8922 8920 5585/8860/8920/8922 Pet Training Pad Holders 20 A 0 0 0 pet-training-pad-holders 5585/8860/8920
8931 8929 5585/8860/8929/8931 Reptile & Amphibian Habitat Accessories 20 A 0 0 0 reptile-and-amphibian-habitat-accessories 5585/8860/8929
8937 8935 5585/8860/8935/8937 Small Animal Food 20 A 0 0 0 small-animal-food 5585/8860/8935
6720 6423 5585/8860/6423/6720 Aquarium Cleaning Supplies 30 A 0 0 8 aquarium-cleaning-supplies 5585/8860/6423
8866 8861 5585/8860/8861/8866 Bird Food 30 A 0 0 0 bird-food 5585/8860/8861
6273 6166 5585/8860/6166/6273 Dog Diaper Pads & Liner 30 A 0 0 18 dog-diaper-pads-and-liner 5585/8860/6166
8900 8897 5585/8860/8897/8900 Pet Hair Clippers & Trimmers 30 A 0 0 0 pet-hair-clippers-and-trimmers 5585/8860/8897
8882 8879 5585/8860/8879/8882 Pet Thermometers 30 A 0 0 0 pet-thermometers 5585/8860/8879
8923 8920 5585/8860/8920/8923 Pet Training Pads 30 A 0 0 0 pet-training-pads 5585/8860/8920
8932 8929 5585/8860/8929/8932 Reptile & Amphibian Habitat Heating & Lighting 30 A 0 0 0 reptile-and-amphibian-habitat-heating-and-lighting 5585/8860/8929
8938 8935 5585/8860/8935/8938 Small Animal Habitat Accessories 30 A 0 0 0 small-animal-habitat-accessories 5585/8860/8935
6782 6423 5585/8860/6423/6782 Aquarium Decor 40 A 0 0 19 aquarium-decor 5585/8860/6423
8867 8861 5585/8860/8861/8867 Bird Gyms & Playstands 40 A 0 0 0 bird-gyms-and-playstands 5585/8860/8861
6290 6166 5585/8860/6166/6290 Dog Diapers 40 A 0 0 0 dog-diapers 5585/8860/6166
6166 8860 5585/8860/6166 Dog Supplies 40 A 0 0 101 dog-supplies 5585/8860
8901 8897 5585/8860/8897/8901 Pet Hair Dryers 40 A 0 0 0 pet-hair-dryers 5585/8860/8897
8924 8920 5585/8860/8920/8924 Pet Training Sprays & Solutions 40 A 0 0 0 pet-training-sprays-and-solutions 5585/8860/8920
8933 8929 5585/8860/8929/8933 Reptile & Amphibian Habitats 40 A 0 0 0 reptile-and-amphibian-habitats 5585/8860/8929
8939 8935 5585/8860/8935/8939 Small Animal Habitats & Cages 40 A 0 0 0 small-animal-habitats-and-cages 5585/8860/8935
6818 6423 5585/8860/6423/6818 Aquarium Filters 50 A 0 0 0 aquarium-filters 5585/8860/6423
8868 8861 5585/8860/8861/8868 Bird Ladders & Perches 50 A 0 0 0 bird-ladders-and-perches 5585/8860/8861
6312 6166 5585/8860/6166/6312 Dog Food 50 A 0 0 3 dog-food 5585/8860/6166
8875 8860 5585/8860/8875 Pet Agility Equipment 50 A 0 0 0 pet-agility-equipment 5585/8860
8902 8897 5585/8860/8897/8902 Pet Nail Polish 50 A 0 0 0 pet-nail-polish 5585/8860/8897
8934 8929 5585/8860/8929/8934 Reptile & Amphibian Substrates 50 A 0 0 0 reptile-and-amphibian-substrates 5585/8860/8929
8940 8935 5585/8860/8935/8940 Small Animal Treats 50 A 0 0 0 small-animal-treats 5585/8860/8935
6876 6423 5585/8860/6423/6876 Aquarium Fish Nets 60 A 0 0 0 aquarium-fish-nets 5585/8860/6423
8869 8861 5585/8860/8861/8869 Bird Toys 60 A 0 0 0 bird-toys 5585/8860/8861
6408 6166 5585/8860/6166/6408 Dog Houses 60 A 0 0 0 dog-houses 5585/8860/6166
8876 8860 5585/8860/8876 Pet Apparel Hangers 60 A 0 0 0 pet-apparel-hangers 5585/8860
8903 8897 5585/8860/8897/8903 Pet Nail Tools 60 A 0 0 0 pet-nail-tools 5585/8860/8897
6983 6423 5585/8860/6423/6983 Aquarium Lighting 70 A 0 0 0 aquarium-lighting 5585/8860/6423
8870 8861 5585/8860/8861/8870 Bird Treats 70 A 0 0 0 bird-treats 5585/8860/8861
6428 6166 5585/8860/6166/6428 Dog Kennel & Run Accessories 70 A 0 0 1 dog-kennel-and-run-accessories 5585/8860/6166
8877 8860 5585/8860/8877 Pet Bed Accessories 70 A 0 0 0 pet-bed-accessories 5585/8860
8904 8897 5585/8860/8897/8904 Pet Shampoo & Conditioner 70 A 0 0 0 pet-shampoo-and-conditioner 5585/8860/8897
7137 6423 5585/8860/6423/7137 Aquarium Stands 80 A 0 0 0 aquarium-stands 5585/8860/6423
6439 6166 5585/8860/6166/6439 Dog Kennels & Runs 80 A 0 0 2 dog-kennels-and-runs 5585/8860/6166
8878 8860 5585/8860/8878 Pet Bells & Charms 80 A 0 0 0 pet-bells-and-charms 5585/8860
8905 8897 5585/8860/8897/8905 Pet Wipes 80 A 0 0 0 pet-wipes 5585/8860/8897
7168 6423 5585/8860/6423/7168 Aquarium Temperature Controllers 90 A 0 0 0 aquarium-temperature-controllers 5585/8860/6423
6451 6166 5585/8860/6166/6451 Dog Toys 90 A 0 0 10 dog-toys 5585/8860/6166
8879 8860 5585/8860/8879 Pet Biometric Monitors 90 A 0 0 0 pet-biometric-monitors 5585/8860
7202 6423 5585/8860/6423/7202 Aquarium Water Treatments 100 A 0 0 0 aquarium-water-treatments 5585/8860/6423
6462 6166 5585/8860/6166/6462 Dog Treadmills 100 A 0 0 0 dog-treadmills 5585/8860/6166
8883 8860 5585/8860/8883 Pet Bowl Mats 100 A 0 0 1 pet-bowl-mats 5585/8860
7027 6423 5585/8860/6423/7027 Aquarium Overflow Boxes 110 A 0 0 0 aquarium-overflow-boxes 5585/8860/6423
7230 6423 5585/8860/6423/7230 Aquariums 110 A 0 0 12 aquariums 5585/8860/6423
6472 6166 5585/8860/6166/6472 Dog Treats 110 A 0 0 0 dog-treats 5585/8860/6166
8884 8860 5585/8860/8884 Pet Bowl Stands 110 A 0 0 0 pet-bowl-stands 5585/8860
7261 6423 5585/8860/6423/7261 Aquatic Plant Fertilizers 120 A 0 0 0 aquatic-plant-fertilizers 5585/8860/6423
8885 8860 5585/8860/8885 Pet Bowls, Feeders & Waterers 120 A 0 0 72 pet-bowls-feeders-and-waterers 5585/8860
7290 6423 5585/8860/6423/7290 Fish Feeders 130 A 0 0 0 fish-feeders 5585/8860/6423
8886 8860 5585/8860/8886 Pet Carrier & Crate Accessories 130 A 0 0 0 pet-carrier-and-crate-accessories 5585/8860
7321 6423 5585/8860/6423/7321 Fish Food 140 A 0 0 0 fish-food 5585/8860/6423
8887 8860 5585/8860/8887 Pet Carriers & Crates 140 A 0 0 15 pet-carriers-and-crates 5585/8860
8874 6423 5585/8860/6423/8874 Aquarium Gravel & Substrates 150 A 0 0 0 aquarium-gravel-and-substrates 5585/8860/6423
8888 8860 5585/8860/8888 Pet Collars & Harnesses 150 A 0 0 0 pet-collars-and-harnesses 5585/8860
8889 8860 5585/8860/8889 Pet Containment Systems 160 A 0 0 0 pet-containment-systems 5585/8860
8890 8860 5585/8860/8890 Pet Door Accessories 170 A 0 0 0 pet-door-accessories 5585/8860
8891 8860 5585/8860/8891 Pet Doors 180 A 0 0 0 pet-doors 5585/8860
8892 8860 5585/8860/8892 Pet Eye Drops & Lubricants 190 A 0 0 0 pet-eye-drops-and-lubricants 5585/8860
8893 8860 5585/8860/8893 Pet First Aid & Emergency Kits 200 A 0 0 0 pet-first-aid-and-emergency-kits 5585/8860
8894 8860 5585/8860/8894 Pet Flea & Tick Control 210 A 0 0 0 pet-flea-and-tick-control 5585/8860
8895 8860 5585/8860/8895 Pet Food Containers 220 A 0 0 0 pet-food-containers 5585/8860
8896 8860 5585/8860/8896 Pet Food Scoops 230 A 0 0 0 pet-food-scoops 5585/8860
8897 8860 5585/8860/8897 Pet Grooming Supplies 240 A 0 0 12 pet-grooming-supplies 5585/8860
8906 8860 5585/8860/8906 Pet Heating Pad Accessories 250 A 0 0 0 pet-heating-pad-accessories 5585/8860
8907 8860 5585/8860/8907 Pet Heating Pads 260 A 0 0 0 pet-heating-pads 5585/8860
8908 8860 5585/8860/8908 Pet ID Tags 270 A 0 0 0 pet-id-tags 5585/8860
8909 8860 5585/8860/8909 Pet Leash Extensions 280 A 0 0 0 pet-leash-extensions 5585/8860
8910 8860 5585/8860/8910 Pet Leashes 290 A 0 0 0 pet-leashes 5585/8860
8911 8860 5585/8860/8911 Pet Medical Collars 300 A 0 0 0 pet-medical-collars 5585/8860
8912 8860 5585/8860/8912 Pet Medical Tape & Bandages 310 A 0 0 0 pet-medical-tape-and-bandages 5585/8860
8913 8860 5585/8860/8913 Pet Medicine 320 A 0 0 4 pet-medicine 5585/8860
8914 8860 5585/8860/8914 Pet Muzzles 330 A 0 0 0 pet-muzzles 5585/8860
8915 8860 5585/8860/8915 Pet Oral Care Supplies 340 A 0 0 0 pet-oral-care-supplies 5585/8860
8916 8860 5585/8860/8916 Pet Playpens 350 A 0 0 0 pet-playpens 5585/8860
8917 8860 5585/8860/8917 Pet Steps & Ramps 360 A 0 0 0 pet-steps-and-ramps 5585/8860
8918 8860 5585/8860/8918 Pet Strollers 370 A 0 0 0 pet-strollers 5585/8860
8919 8860 5585/8860/8919 Pet Sunscreen 380 A 0 0 0 pet-sunscreen 5585/8860
8920 8860 5585/8860/8920 Pet Training Aids 390 A 0 0 0 pet-training-aids 5585/8860
8925 8860 5585/8860/8925 Pet Vitamins & Supplements 400 A 0 0 17 pet-vitamins-and-supplements 5585/8860
8926 8860 5585/8860/8926 Pet Waste Bag Dispensers & Holders 410 A 0 0 0 pet-waste-bag-dispensers-and-holders 5585/8860
8927 8860 5585/8860/8927 Pet Waste Bags 420 A 0 0 0 pet-waste-bags 5585/8860
8928 8860 5585/8860/8928 Pet Waste Disposal Systems & Tools 430 A 0 0 0 pet-waste-disposal-systems-and-tools 5585/8860
8929 8860 5585/8860/8929 Reptile & Amphibian Supplies 440 A 0 0 0 reptile-and-amphibian-supplies 5585/8860
8935 8860 5585/8860/8935 Small Animal Supplies 450 A 0 0 0 small-animal-supplies 5585/8860
8941 8860 5585/8860/8941 Vehicle Pet Barriers 460 A 0 0 0 vehicle-pet-barriers 5585/8860