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_seo_names.name as seo_name, 
  cscart_seo_names.path as seo_path, 
  cscart_categories.ab__lc_catalog_image_control 
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 '166/%' 
  AND cscart_categories.category_id != 264 
  AND cscart_categories.parent_id != 264 
  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.00420

JSON explain

{
  "query_block": {
    "select_id": 1,
    "cost_info": {
      "query_cost": "57.24"
    },
    "ordering_operation": {
      "using_temporary_table": true,
      "using_filesort": true,
      "nested_loop": [
        {
          "table": {
            "table_name": "cscart_categories",
            "access_type": "range",
            "possible_keys": [
              "PRIMARY",
              "c_status",
              "parent",
              "id_path",
              "p_category_id"
            ],
            "key": "id_path",
            "used_key_parts": [
              "id_path"
            ],
            "key_length": "767",
            "rows_examined_per_scan": 62,
            "rows_produced_per_join": 1,
            "filtered": "2.00",
            "index_condition": "(`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`id_path` like '166/%')",
            "cost_info": {
              "read_cost": "28.04",
              "eval_cost": "0.12",
              "prefix_cost": "28.16",
              "data_read_per_join": "3K"
            },
            "used_columns": [
              "category_id",
              "parent_id",
              "id_path",
              "company_id",
              "storefront_id",
              "usergroup_ids",
              "status",
              "position",
              "is_trash",
              "ab__lc_catalog_image_control"
            ],
            "attached_condition": "(((`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids` = '') or (0 <> find_in_set(0,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`)) or (0 <> find_in_set(1,`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`usergroup_ids`))) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`status` = 'A') and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`category_id` <> 264) and (`softwarepirmam_hewadelivard_cscart_4`.`cscart_categories`.`parent_id` <> 264) and (`softwarepirmam_hewadelivard_cscart_4`.`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": [
              "softwarepirmam_hewadelivard_cscart_4.cscart_categories.category_id",
              "const"
            ],
            "rows_examined_per_scan": 1,
            "rows_produced_per_join": 1,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "0.31",
              "eval_cost": "0.12",
              "prefix_cost": "28.59",
              "data_read_per_join": "4K"
            },
            "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": [
              "softwarepirmam_hewadelivard_cscart_4.cscart_categories.category_id",
              "const",
              "const",
              "const"
            ],
            "rows_examined_per_scan": 66,
            "rows_produced_per_join": 81,
            "filtered": "100.00",
            "cost_info": {
              "read_cost": "20.46",
              "eval_cost": "8.18",
              "prefix_cost": "57.24",
              "data_read_per_join": "138K"
            },
            "used_columns": [
              "name",
              "object_id",
              "type",
              "dispatch",
              "path",
              "lang_code"
            ]
          }
        }
      ]
    }
  }
}

Result

category_id parent_id id_path category position status company_id storefront_id seo_name seo_path ab__lc_catalog_image_control
379 378 166/378/379 Anker 10 A 0 0 anker 166/378 none
323 322 166/322/323 Apple watch 10 A 0 0 apple-watch 166/322 none
344 329 166/329/344 Buds 10 A 0 0 airpod 166/329 none
450 424 166/423/424/450 Cables 10 A 0 0 cables 166/423/424 none
381 350 166/350/381 Combo 10 A 0 0 combo 166/350 none
167 166 166/167 Computers & Laptops 10 A 0 0 computers 166 none
514 513 166/513/514 Hard Disk Drives (HDD) 10 A 0 0 hard-disk-drives-hdd 166/513 none
609 608 166/600/608/609 Hard Disk Drives (HDD) 10 A 0 0 hard-disk-drives-hdd 166/600/608 none
360 359 166/328/359/360 Indoor Access Point 10 A 0 0 indoor-access-point 166/328/359 none
321 320 166/320/321 iPad 10 A 0 0 ipad 166/320 none
235 234 166/234/235 iPhone 10 A 0 0 iphone 166/234 none
356 167 166/167/356 Mac 10 A 0 0 mac 166/167 none
362 342 166/328/342/362 Managed Switch 10 A 0 0 managed-switch 166/328/342 none
415 414 166/351/414/415 On-Line UPS 10 A 0 0 online-and-smart-ups 166/351/414 none
601 600 166/600/601 Processors (CPU) 10 A 0 0 cpu 166/600 none
341 328 166/328/341 Router 10 A 0 0 router 166/328 none
527 329 166/329/527 Sound Bars 10 A 0 0 sound-bars 166/329 none
190 174 166/174/190 TVs 10 A 0 0 led-tvs 166/174 none
414 351 166/351/414 UPS 10 A 0 0 maxma 166/351 none
357 170 166/170/357 Xiaomi 10 A 0 0 xiaomi 166/170 none
424 423 166/423/424 Chargers & Cables 20 A 0 0 chargers 166/423 none
352 167 166/167/352 Dell 20 A 0 0 dell 166/167 none
326 234 166/234/326 Galaxy 20 A 0 0 samsung 166/234 none
325 320 166/320/325 Galaxy Tab 20 A 0 0 galaxy-tab 166/320 none
324 322 166/322/324 Galaxy Watch 20 A 0 0 galaxy-watch 166/322 none
602 600 166/600/602 Graphics Cards (GPU) 20 A 0 0 graphics-cards-gpu 166/600 none
432 378 166/378/432 Hama 20 A 0 0 hama 166/378 none
358 170 166/170/358 LG 20 A 0 0 lg 166/170 none
613 414 166/351/414/613 Line-Interactive UPS (Offline) 20 A 0 0 offline-ups 166/351/414 none
382 350 166/350/382 Mouse 20 A 0 0 mouse 166/350 none
361 359 166/328/359/361 Outdoor Access Point 20 A 0 0 outdoor-access-point 166/328/359 none
429 351 166/351/429 PDU 20 A 0 0 pdu 166/351 none
451 424 166/423/424/451 Power Adapter 20 A 0 0 power-adapter 166/423/424 none
515 513 166/513/515 Solid State Drives (SSD) 20 A 0 0 solid-state-drives-ssd 166/513 none
610 608 166/600/608/610 Solid State Drives (SSD) 20 A 0 0 solid-state-drive-ssd 166/600/608 none
337 174 166/174/337 Sound Bars 20 A 0 0 sound-bar 166/174 none
342 328 166/328/342 Switch 20 A 0 0 switch 166/328 none
363 342 166/328/342/363 Unmanaged Switch 20 A 0 0 unmanaged-switch 166/328/342 none
516 513 166/513/516 USB Flash Drives 30 A 0 0 usb-flash-drives 166/513 none
430 351 166/351/430 Batteries 30 A 0 0 batteries 166/351 none
452 424 166/423/424/452 Charger Combo 30 A 0 0 combo 166/423/424 none
425 423 166/423/425 Docking Stations 30 A 0 0 docking-station 166/423 none
343 543 166/328/543/343 Ethernet Cable 30 A 0 0 ethernet-cable 166/328/543 none
353 167 166/167/353 HP 30 A 0 0 hp 166/167 none
383 350 166/350/383 Keyboard 30 A 0 0 keyboard 166/350 none
234 166 166/234 Mobiles 30 A 0 0 cellphone 166 none
603 600 166/600/603 Motherboards 30 A 0 0 motherboards 166/600 none
236 234 166/234/236 Xiaomi 30 A 0 0 xiaomi 166/234 none
443 378 166/378/443 Xiaomi 30 A 0 0 xiaomi 166/378 none
339 320 166/320/339 Xiaomi Pad 30 A 0 0 xiaomi-tablet 166/320 none
340 322 166/322/340 Xiaomi Smart Watches 30 A 0 0 xiaomi-smart-watches 166/322 none
359 328 166/328/359 Access Point 40 A 0 0 access-point 166/328 none
426 424 166/423/424/426 Cable Adapters 40 A 0 0 adapters 166/423/424 none
544 543 166/328/543/544 Coaxial Cable 40 A 0 0 coaxial-cable 166/328/543 none
483 378 166/378/483 Dviced 40 A 0 0 dviced 166/378 none
469 320 166/320/469 Huawei Pads 40 A 0 0 huawei-pads 166/320 none
471 322 166/322/471 Huawei Watches 40 A 0 0 huawei-watches 166/322 none
354 167 166/167/354 Lenovo 40 A 0 0 lenovo 166/167 none
505 170 166/170/505 Lenovo 40 A 0 0 lenovo 166/170 none
517 513 166/513/517 Memory Cards 40 A 0 0 memory-cards 166/513 none
170 166 166/170 Monitors 40 A 0 0 monitors 166 none
559 234 166/234/559 Motorola 40 A 0 0 motorola-en 166/234 none
604 600 166/600/604 PC Cases 40 A 0 0 pc-cases 166/600 none
486 174 166/174/486 Projectors 40 A 0 0 projectors 166/174 none
526 170 166/170/526 Samsung 40 A 0 0 samsung 166/170 none
320 166 166/320 Tablets 40 A 0 0 tablets 166 none
355 167 166/167/355 Asus 50 A 0 0 asus 166/167 none
490 378 166/378/490 Belkin 50 A 0 0 belkin 166/378 none
518 513 166/513/518 Card Readers 50 A 0 0 card-readers 166/513 none
528 170 166/170/528 Dell 50 A 0 0 dell 166/170 none
364 328 166/328/364 Firewall 50 A 0 0 firewall 166/328 none
399 329 166/329/399 Headsets 50 A 0 0 headsets 166/329 none
614 320 166/320/614 Honor Pad 50 A 0 0 honor-pad 166/320 none
470 234 166/234/470 Huawei 50 A 0 0 huawei 166/234 none
567 543 166/328/543/567 POE Adapters 50 A 0 0 poe-adapters 166/328/543 none
605 600 166/600/605 Power Supply (PSU) 50 A 0 0 power-supply-psu 166/600 none
322 166 166/322 Smart Watches 50 A 0 0 smart-watch 166 none
446 351 166/351/446 Sockets & Wall Plugs 50 A 0 0 sockets-and-wall-plugs 166/351 none
174 166 166/174 TV & Theatre 50 A 0 0 tv-and-video 166 none
529 170 166/170/529 Asus 60 A 0 0 asus 166/170 none
506 378 166/378/506 Baykron 60 A 0 0 baykron 166/378 none
648 351 166/351/648 EV Car Chargers 60 A 0 0 ev-car-chargers 166/351 none
457 329 166/329/457 Headphone 60 A 0 0 headphone 166/329 none
444 167 166/167/444 Microsoft Surface 60 A 0 0 microsoft 166/167 none
328 166 166/328 Network 60 A 0 0 network 166 none
606 600 166/600/606 PC Cooling 60 A 0 0 pc-cooling 166/600 none
448 423 166/423/448 Screen Protectors 60 A 0 0 screen-protectors 166/423 none
366 328 166/328/366 Wireless Access Controller (WAC) 60 A 0 0 wac 166/328 none
525 167 166/167/525 Acer 65 A 0 0 acer 166/167 none
329 166 166/329 Audio 70 A 0 0 headphone-and-speakers 166 none
449 423 166/423/449 Cases & Covers 70 A 0 0 cases-and-covers 166/423 none
608 600 166/600/608 Computer Storage 70 A 0 0 computer-storage 166/600 none
530 170 166/170/530 HP 70 A 0 0 hp 166/170 none
532 167 166/167/532 MSI 70 A 0 0 msi-en 166/167 none
438 328 166/328/438 Range Extender 70 A 0 0 range-extender 166/328 none
347 329 166/329/347 Speakers 70 A 0 0 speakers 166/329 none
477 423 166/423/477 Stylus Pens 70 A 0 0 stylus-pens 166/423 none
519 167 166/167/519 All in One 80 A 0 0 all-in-one 166/167 none
481 328 166/328/481 Fiber Splicing Machine 80 A 0 0 fiber-splicing-machine 166/328 none
531 170 166/170/531 MSI 80 A 0 0 msi 166/170 none
607 600 166/600/607 RAM 80 A 0 0 ram 166/600 none
492 424 166/423/424/492 Wireless Charging & Stands 90 A 0 0 wireless-charging-and-stands 166/423/424 none
520 423 166/423/520 Webcam Camera 100 A 0 0 webcam-camera 166/423 none
350 166 166/350 Mouse & Keyboard 110 A 0 0 mouse-and-keyboard 166 none
585 423 166/423/585 Watch Bands 110 A 0 0 watch-bands 166/423 none
524 399 166/329/399/524 Gaming Headsets 120 A 0 0 gaming-headsets 166/329/399 none
543 328 166/328/543 Network Cables & POE Adapters 120 A 0 0 network-cable 166/328 none
523 399 166/329/399/523 Office Headsets 120 A 0 0 office-headsets 166/329/399 none
586 423 166/423/586 Trackers 120 A 0 0 trackers 166/423 none
351 166 166/351 UPS & Power Units 120 A 0 0 ups 166 none
657 423 166/423/657 Car Phone Holders 130 A 0 0 car-phone-holders 166/423 none
564 328 166/328/564 Point to Point 130 A 0 0 point-to-point 166/328 none
378 166 166/378 Power Banks 130 A 0 0 power-banks 166 none
589 328 166/328/589 IP Phone 140 A 0 0 ip-phone 166/328 none
513 166 166/513 Storage 140 A 0 0 external-storage 166 none
423 166 166/423 Accessories 150 A 0 0 accessories 166 none
600 166 166/600 PC Compnents 160 A 0 0 pc-compnents 166 none