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 '5457/%' 
  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.02497

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "241.38"
    },
    "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": 166,
            "rows_produced_per_join": 3,
            "filtered": "2.00",
            "index_condition": "(`webmarco`.`cscart_categories`.`id_path` like '5457/%')",
            "cost_info": {
              "read_cost": "232.75",
              "eval_cost": "0.66",
              "prefix_cost": "233.41",
              "data_read_per_join": "19K"
            },
            "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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.32",
              "eval_cost": "0.66",
              "prefix_cost": "237.39",
              "data_read_per_join": "13K"
            },
            "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": 3,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "3.32",
              "eval_cost": "0.66",
              "prefix_cost": "241.38",
              "data_read_per_join": "5K"
            },
            "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
5862 5845 5457/5845/5862 Address Books 10 A 0 0 0 address-books 5457/5845
7271 7244 5457/7244/7271 Anti-Fatigue Mats 10 A 0 0 0 anti-fatigue-mats 5457/7244
6570 6549 5457/5645/6549/6570 Art Charcoals 10 A 0 0 0 art-charcoals 5457/5645/6549
7162 7107 5457/5645/6549/6786/7107/7162 Art Pencil 10 A 0 0 1 art-pencil 5457/5645/6549/6786/7107
7392 7359 5457/7359/7392 AV Carts 10 A 0 0 0 av-carts 5457/7359
7616 7603 5457/5624/7603/7616 Basic Calculators 10 A 0 0 1 basic-calculators 5457/5624/7603
5879 5870 5457/5845/5870/5879 Binder Accessories 10 A 0 0 0 binder-accessories 5457/5845/5870
6342 6294 5457/5960/6294/6342 Binder Clips 10 A 0 0 0 binder-clips 5457/5960/6294
6498 6449 5457/5960/6449/6498 Binder Paper 10 A 0 0 0 binder-paper 5457/5960/6449
5894 5879 5457/5845/5870/5879/5894 Binder Rings 10 A 0 0 0 binder-rings 5457/5845/5870/5879
5781 5769 5457/5769/5781 Book Covers 10 A 0 0 4 book-covers 5457/5769
8448 6108 5457/5747/6108/8448 Bulletin Board Accessories 10 A 0 0 0 bulletin-board-accessories-en 5457/5747/6108
9022 8448 5457/5747/6108/8448/9022 Bulletin Board Trim 10 A 0 0 0 bulletin-board-trim 5457/5747/6108/8448
5896 5645 5457/5645/5896 Call Bells 10 A 0 0 0 call-bells 5457/5645
6093 5747 5457/5747/6093 Chalkboards 10 A 0 0 0 chalkboards 5457/5747
6414 6321 5457/5960/6321/6414 Correction Fluids 10 A 0 0 0 correction-fluids 5457/5960/6321
6249 5714 5457/5714/6249 Fingertip Grips 10 A 0 0 0 fingertip-grips 5457/5714
8255 6452 5457/5645/6219/6452/8255 Highlighter Refills 10 A 0 0 0 highlighter-refills 5457/5645/6219/6452
6932 6661 5457/5645/6549/6661/6932 Highlighters 10 A 0 0 0 highlighters 5457/5645/6549/6661
6047 6015 5457/5960/6015/6047 Label Tapes & Refill Rolls 10 A 0 0 3 label-tapes-and-refill-rolls 5457/5960/6015
6015 5960 5457/5960/6015 Labels & Tags 10 A 0 0 1 labels-and-tags 5457/5960
5775 5624 5457/5624/5775 Laminators 10 A 0 0 0 laminators 5457/5624
6452 6219 5457/5645/6219/6452 Marker & Highlighter Ink Refills 10 A 0 0 41 marker-and-highlighter-ink-r 5457/5645/6219
8394 7193 5457/5645/6549/6786/7107/7193/8394 Mechanical Pencils 10 A 0 0 0 mechanical-pencils-en 5457/5645/6549/6786/7107/7193
6426 6343 5457/6343/6426 Moving & Shipping Boxes 10 A 0 0 1 moving-and-shipping-boxes 5457/6343
5645 5457 5457/5645 Office Instruments 10 A 0 0 0 office-instruments 5457
6255 5960 5457/5960/6255 Office Tape 10 A 0 0 0 office-tape 5457/5960
6228 6208 5457/5845/6208/6228 Padfolios 10 A 0 0 0 padfolios 5457/5845/6208
7078 6786 5457/5645/6549/6786/7078 Pen & Pencil Sets 10 A 0 0 8 pen-and-pencil-sets 5457/5645/6549/6786
6122 6102 5457/5845/6102/6122 Pocket Folders 10 A 0 0 0 pocket-folders 5457/5845/6102
6321 5960 5457/5960/6321 Correction Fluids, Pens & Tapes 20 A 0 0 0 correction-fluids-pens-and-tapes 5457/5960
5938 5870 5457/5845/5870/5938 Binders 20 A 0 0 0 binders 5457/5845/5870
5870 5845 5457/5845/5870 Binding Supplies 20 A 0 0 0 binding-supplies 5457/5845
6531 6449 5457/5960/6449/6531 Blank ID Cards 20 A 0 0 2 blank-id-cards 5457/5960/6449
7457 7359 5457/7359/7457 Book Carts 20 A 0 0 0 book-carts 5457/7359
5798 5769 5457/5769/5798 Book Lights 20 A 0 0 0 book-lights 5457/5769
9023 8448 5457/5747/6108/8448/9023 Bulletin Board Trim Sets 20 A 0 0 0 bulletin-board-trim-sets 5457/5747/6108/8448
9025 6108 5457/5747/6108/9025 Bulletin Boards 20 A 0 0 0 bulletin-boards 5457/5747/6108
7305 7244 5457/7244/7305 Chair Mats 20 A 0 0 0 chair-mats 5457/7244
6593 6549 5457/5645/6549/6593 Chalk 20 A 0 0 2 chalk 5457/5645/6549
6045 5645 5457/5645/6045 Clipboards 20 A 0 0 0 clipboards 5457/5645
7634 7603 5457/5624/7603/7634 Construction Calculators 20 A 0 0 0 construction-calculators 5457/5624/7603
6435 6321 5457/5960/6321/6435 Correction Pens 20 A 0 0 0 correction-pens 5457/5960/6321
6108 5747 5457/5747/6108 Display Boards 20 A 0 0 0 display-boards 5457/5747
6280 5714 5457/5714/6280 Hole Punches 20 A 0 0 0 hole-punches 5457/5714
5914 5879 5457/5845/5870/5879/5914 Index Dividers 20 A 0 0 0 index-dividers 5457/5845/5870/5879
6193 5960 5457/5960/6193 Laminating Film, Pouches & Sheets 20 A 0 0 8 laminating-film-pouches-and-sheets 5457/5960
6480 6219 5457/5645/6219/6480 Marker & Highlighter Ink 20 A 0 0 0 marker-and-highlighter-ink 5457/5645/6219
8270 6452 5457/5645/6219/6452/8270 Marker Refills 20 A 0 0 1 marker-refills 5457/5645/6219/6452
6989 6661 5457/5645/6549/6661/6989 Markers 20 A 0 0 3 markers 5457/5645/6549/6661
5795 5624 5457/5624/5795 Office Shredders 20 A 0 0 0 office-shredders 5457/5624
6443 6343 5457/6343/6443 Packing Materials 20 A 0 0 1 packing-materials 5457/6343
6418 6294 5457/5960/6294/6418 Paper Clips 20 A 0 0 0 paper-clips 5457/5960/6294
7107 6786 5457/5645/6549/6786/7107 Pencils 20 A 0 0 0 pencils 5457/5645/6549/6786
6253 6208 5457/5845/6208/6253 Portfolios 20 A 0 0 0 portfolios 5457/5845/6208
6150 6102 5457/5845/6102/6150 Report Covers 20 A 0 0 0 report-covers 5457/5845/6102
6099 6015 5457/5960/6015/6099 Shipping Labels 20 A 0 0 0 shipping-labels 5457/5960/6015
8407 7193 5457/5645/6549/6786/7107/7193/8407 Wooden Pencils 20 A 0 0 0 wooden-pencils-en 5457/5645/6549/6786/7107/7193
7193 7107 5457/5645/6549/6786/7107/7193 Writing Pencils 20 A 0 0 0 writing-pen 5457/5645/6549/6786/7107
5947 5870 5457/5845/5870/5947 Binding Combs & Spines 30 A 0 0 0 binding-combs-and-spines 5457/5845/5870
5804 5769 5457/5769/5804 Book Stands & Rests 30 A 0 0 0 book-stands-and-rests 5457/5769
5984 5845 5457/5845/5984 Business Card Books 30 A 0 0 0 business-card-books 5457/5845
6555 6449 5457/5960/6449/6555 Business Cards 30 A 0 0 0 business-cards 5457/5960/6449
6463 6321 5457/5960/6321/6463 Correction Tapes 30 A 0 0 0 correction-tapes 5457/5960/6321
6636 6549 5457/5645/6549/6636 Crayons 30 A 0 0 0 crayons 5457/5645/6549
6143 5747 5457/5747/6143 Document Cameras 30 A 0 0 0 document-cameras 5457/5747
7471 7359 5457/7359/7471 File Carts 30 A 0 0 0 file-carts 5457/7359
7638 7603 5457/5624/7603/7638 Financial Calculators 30 A 0 0 6 financial-calculators 5457/5624/7603
9026 6108 5457/5747/6108/9026 Foam Boards 30 A 0 0 0 foam-boards 5457/5747/6108
6068 5645 5457/5645/6068 Letter Openers 30 A 0 0 0 letter-openers 5457/5645
6229 5960 5457/5960/6229 Mounting Putty 30 A 0 0 0 mounting-putty 5457/5960
7331 7244 5457/7244/7331 Office Mats 30 A 0 0 0 office-mats 5457/7244
6490 6343 5457/6343/6490 Packing Tape 30 A 0 0 0 packing-tape 5457/6343
6310 5714 5457/5714/6310 Paper Folding Machines 30 A 0 0 0 paper-folding-machines 5457/5714
6495 6219 5457/5645/6219/6495 Pen Ink & Refills 30 A 0 0 1 pen-ink-and-refills 5457/5645/6219
7265 6786 5457/5645/6549/6786/7265 Pens 30 A 0 0 36 pens 5457/5645/6549/6786
5813 5624 5457/5624/5813 Postage Meters 30 A 0 0 0 postage-meters 5457/5624
5924 5879 5457/5845/5870/5879/5924 Sheet Protectors 30 A 0 0 0 sheet-protectors 5457/5845/5870/5879
6154 6015 5457/5960/6015/6154 Shipping Tags 30 A 0 0 0 shipping-tags 5457/5960/6015
6513 6015 5457/5960/6015/6513 Address Labels 40 A 0 0 0 address-labels 5457/5960/6015
5958 5870 5457/5845/5870/5958 Binding Machines 40 A 0 0 0 binding-machines 5457/5845/5870
5816 5769 5457/5769/5816 Bookmarks 40 A 0 0 0 bookmarks 5457/5769
5994 5845 5457/5845/5994 Business Card Stands 40 A 0 0 0 business-card-stands 5457/5845
6607 6449 5457/5960/6449/6607 Business Forms & Receipts 40 A 0 0 0 business-forms-and-receipts 5457/5960/6449
6165 5747 5457/5747/6165 Dry-Erase Boards 40 A 0 0 0 dry-erase-boards 5457/5747
7649 7603 5457/5624/7603/7649 Graphing Calculators 40 A 0 0 0 graphing-calculators 5457/5624/7603
6094 5645 5457/5645/6094 Magnifiers 40 A 0 0 0 magnifiers 5457/5645
7569 7359 5457/7359/7569 Mail Carts 40 A 0 0 0 mail-carts 5457/7359
6661 6549 5457/5645/6549/6661 Markers & Highlighters 40 A 0 0 0 markers-and-highlighters 5457/5645/6549
9027 6108 5457/5747/6108/9027 Mounting Boards 40 A 0 0 0 mounting-boards 5457/5747/6108
6294 5960 5457/5960/6294 Paper Clips & Clamps 40 A 0 0 0 paper-clips-and-clamps 5457/5960
6332 5714 5457/5714/6332 Paper Joggers 40 A 0 0 0 paper-joggers 5457/5714
6510 6219 5457/5645/6219/6510 Pencil Lead & Refills 40 A 0 0 0 pencil-lead-and-refills 5457/5645/6219
5823 5624 5457/5624/5823 Time & Attendance Clocks 40 A 0 0 7 time-and-attendance-clocks 5457/5624
6648 6449 5457/5960/6449/6648 Checks 50 A 0 0 0 checks 5457/5960/6449
6299 5960 5457/5960/6299 Brass Fasteners 50 A 0 0 0 brass-fasteners 5457/5960
6002 5845 5457/5845/6002 CD/DVD Cases & Organizers 50 A 0 0 0 cd-dvd-cases-and-organizers 5457/5845
6185 5747 5457/5747/6185 Easel Pads 50 A 0 0 0 easel-pads 5457/5747
6522 6015 5457/5960/6015/6522 Folder Tabs 50 A 0 0 0 folder-tabs 5457/5960/6015
6116 5645 5457/5645/6116 Office Rubber Stamps 50 A 0 0 0 office-rubber-stamps 5457/5645
6349 5714 5457/5714/6349 Paperweights 50 A 0 0 0 paperweights 5457/5714
9028 6108 5457/5747/6108/9028 Poster Boards 50 A 0 0 0 poster-boards 5457/5747/6108
7660 7603 5457/5624/7603/7660 Scientific Calculators 50 A 0 0 3 scientific-calculators 5457/5624/7603
5839 5624 5457/5624/5839 Transcribers & Dictation Systems 50 A 0 0 0 transcribers-and-dictation-systems 5457/5624
7578 7359 5457/7359/7578 Utility Carts 50 A 0 0 0 utility-carts 5457/7359
6013 5845 5457/5845/6013 Calendars, Organizers & Planners 60 A 0 0 0 calendars-organizers-and-planners 5457/5845
6693 6449 5457/5960/6449/6693 Cover Paper 60 A 0 0 1 cover-paper 5457/5960/6449
6207 5747 5457/5747/6207 Easels 60 A 0 0 0 easels 5457/5747
6534 6015 5457/5960/6015/6534 Label Clips 60 A 0 0 0 label-clips 5457/5960/6015
6722 6549 5457/5645/6549/6722 Multifunction Writing Instruments 60 A 0 0 0 multifunction-writing-instruments 5457/5645/6549
6449 5960 5457/5960/6449 Paper Products 60 A 0 0 41 paper-products 5457/5960
6366 5714 5457/5714/6366 Pencil Boards 60 A 0 0 0 pencil-boards 5457/5714
6135 5645 5457/5645/6135 Pencil Sharpeners 60 A 0 0 0 pencil-sharpeners 5457/5645
5859 5624 5457/5624/5859 Typewriters 60 A 0 0 0 typewriters 5457/5624
7595 5624 5457/5624/7595 Calculator Accessories 70 A 0 0 0 calculator-accessories 5457/5624
6027 5845 5457/5845/6027 Card Files 70 A 0 0 0 card-files 5457/5845
6747 6449 5457/5960/6449/6747 Envelopes 70 A 0 0 0 envelopes 5457/5960/6449
6485 5960 5457/5960/6485 Erasers 70 A 0 0 1 erasers 5457/5960
6221 5747 5457/5747/6221 Laser Pointers 70 A 0 0 0 laser-pointers 5457/5747
5624 5457 5457/5624 Office Equipment 70 A 0 0 6 office-equipment 5457
6756 6549 5457/5645/6549/6756 Pastels 70 A 0 0 0 pastels 5457/5645/6549
6158 5645 5457/5645/6158 Staple Removers 70 A 0 0 0 staple-removers 5457/5645
7603 5624 5457/5624/7603 Calculators 80 A 0 0 1 calculators 5457/5624
6035 5845 5457/5845/6035 Card Sleeves 80 A 0 0 0 card-sleeves 5457/5845
6788 6449 5457/5960/6449/6788 Index Cards 80 A 0 0 1 index-cards 5457/5960/6449
5714 5457 5457/5714 Paper Handling 80 A 0 0 0 paper-handling 5457
6786 6549 5457/5645/6549/6786 Pens & Pencils 80 A 0 0 1 pens-and-pencils 5457/5645/6549
6179 5645 5457/5645/6179 Staplers 80 A 0 0 1 staplers 5457/5645
6259 5747 5457/5747/6259 Transparencies 80 A 0 0 0 transparencies 5457/5747
6046 5845 5457/5845/6046 Cash Boxes 90 A 0 0 0 cash-boxes 5457/5845
7667 5624 5457/5624/7667 Electronic Dictionaries & Translators 90 A 0 0 0 electronic-dictionaries-and-translators 5457/5624
6815 6449 5457/5960/6449/6815 Notebooks & Notepads 90 A 0 0 6 notebooks-and-notepads 5457/5960/6449
5747 5457 5457/5747 Presentation Supplies 90 A 0 0 0 presentation-supplies 5457
7015 5960 5457/5960/7015 Rubber Bands 90 A 0 0 0 rubber-bands 5457/5960
6195 5645 5457/5645/6195 Tape Dispensers 90 A 0 0 0 tape-dispensers 5457/5645
6281 5747 5457/5747/6281 Wireless Presenters 90 A 0 0 0 wireless-presenters 5457/5747
7672 5624 5457/5624/7672 Label Makers 100 A 0 0 0 label-makers 5457/5624
5769 5457 5457/5769 Book Accessories 100 A 0 0 0 book-accessories 5457
6061 5845 5457/5845/6061 Desk Organizers 100 A 0 0 2 desk-organizers 5457/5845
6840 6449 5457/5960/6449/6840 Post Cards 100 A 0 0 4 post-cards 5457/5960/6449
7074 5960 5457/5960/7074 Staples 100 A 0 0 0 staples 5457/5960
6219 5645 5457/5645/6219 Writing & Drawing Instrument Accessories 100 A 0 0 0 writing-and-drawing-instrument-accessories 5457/5645
5825 5457 5457/5825 Desk Pads & Blotters 110 A 0 0 0 desk-pads-and-blotters 5457
6072 5845 5457/5845/6072 File Boxes 110 A 0 0 3 file-boxes 5457/5845
6864 6449 5457/5960/6449/6864 Printer & Copier Paper 110 A 0 0 2 printer-and-copier-paper 5457/5960/6449
7111 5960 5457/5960/7111 Tacks & Pushpins 110 A 0 0 0 tacks-and-pushpins 5457/5960
6549 5645 5457/5645/6549 Writing & Drawing Instruments 110 A 0 0 0 writing-and-drawing-instruments 5457/5645
6090 5845 5457/5845/6090 File Folders 120 A 0 0 0 file-folders 5457/5845
5845 5457 5457/5845 Filing & Organization 120 A 0 0 0 filing-and-organization 5457
6905 6449 5457/5960/6449/6905 Receipt & Adding Machine Paper Rolls 120 A 0 0 7 receipt-and-adding-machine-paper-rolls 5457/5960/6449
6102 5845 5457/5845/6102 Folders & Report Covers 130 A 0 0 0 folders-and-report-covers 5457/5845
5960 5457 5457/5960 General Office Supplies 130 A 0 0 367 general-office-supplies-en 5457
6947 6449 5457/5960/6449/6947 Stationery 130 A 0 0 2 stationery 5457/5960/6449
6167 5845 5457/5845/6167 Greeting Card Organizers 140 A 0 0 0 greeting-card-organizers 5457/5845
6977 6449 5457/5960/6449/6977 Sticky Notes 140 A 0 0 0 sticky-notes 5457/5960/6449
6180 5845 5457/5845/6180 Mail Sorters 150 A 0 0 0 mail-sorters 5457/5845
6192 5845 5457/5845/6192 Pen & Pencil Cases 160 A 0 0 7 pen-and-pencil-cases 5457/5845
6343 5457 5457/6343 Shipping Supplies 160 A 0 0 0 shipping-supplies 5457
7141 5457 5457/7141 Impulse Sealer 170 A 0 0 0 impulse-sealer 5457
6208 5845 5457/5845/6208 Portfolios & Padfolios 170 A 0 0 0 portfolios-and-padfolios 5457/5845
7170 5457 5457/7170 Lap Desks 180 A 0 0 0 lap-desks 5457
6275 5845 5457/5845/6275 Recipe Card Boxes 180 A 0 0 0 recipe-card-boxes 5457/5845
7201 5457 5457/7201 Name Plates 190 A 0 0 0 name-plates 5457
7244 5457 5457/7244 Office & Chair Mats 200 A 0 0 0 office-and-chair-mats 5457
7359 5457 5457/7359 Office Carts 210 A 0 0 0 office-carts 5457
6234 5747 5457/5747/6234 Lecterns 1350 A 0 0 0 lecterns 5457/5747