I just recently upgraded from 1.6 to 1.8 stable, and everything seems to be working well except for the search. I timed the search query at
8 min 11.31 sec on MySQL. I'm running MySQL v5.0.95 on CentOS 5. Our ticket database isn't that large, perhaps 6000 tickets. Below is an explain from MySQL on the search query. I noticed the query is doing about 5 LIKE comparisons which will obviously slow it down, but wasn't expecting anything quite this slow. Any ideas?
+----+-------------+--------+--------+-------------------+--------------+---------+------------------------------------+------+------------------------------+| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |+----+-------------+--------+--------+-------------------+--------------+---------+------------------------------------+------+------------------------------+| 1 | SIMPLE | ticket | ALL | dept_id,staff_id | NULL | NULL | NULL | 5942 | Using where; Using temporary | | 1 | SIMPLE | thread | ref | ticket_id | ticket_id | 4 | prod_ticket.ticket.ticket_id | 4 | Distinct | | 1 | SIMPLE | tentry | ref | entry_lookup | entry_lookup | 8 | const,prod_ticket.ticket.ticket_id | 1 | Distinct | | 1 | SIMPLE | tans | ref | PRIMARY | PRIMARY | 4 | prod_ticket.tentry.id | 118 | Distinct | | 1 | SIMPLE | uentry | ref | entry_lookup | entry_lookup | 8 | const,prod_ticket.ticket.user_id | 1 | Distinct | | 1 | SIMPLE | uans | ref | PRIMARY | PRIMARY | 4 | prod_ticket.uentry.id | 118 | Distinct | | 1 | SIMPLE | user | eq_ref | PRIMARY | PRIMARY | 4 | prod_ticket.ticket.user_id | 1 | Distinct | | 1 | SIMPLE | uemail | ALL | user_email_lookup | NULL | NULL | NULL | 3104 | Using where; Distinct |
+----+-------------+--------+--------+-------------------+--------------+---------+------------------------------------+------+------------------------------+