Extremely slow MySQL performance and high CPU load (up to 40+ second queries) when loading agent panel queues. Hundreds of REGEXP operations in a single COUNT query.
Apply this patch to include/class.search.php to replace the single combined queue-count query with individual per-queue getTotal() calls: replace the try/catch block that calls $query->values()->one() with a simple foreach loop calling $counts['q'.$q->getId()] = $q->getTotal(); This eliminates the massive REGEXP-heavy SQL query. On v1.18.3+ also pass $agent to getTotal() if counts are wrong: $q->getTotal($agent). Upgrade to v1.18.3 which includes performance improvements. The REGEXP overhead is caused by custom queue conditions using multi-value checkbox/dropdown fields.
Originally sourced from forum.osticket.com . osFAQ.org summarises community knowledge for quick reference.