After upgrading to 1.9.4 I run into several performance issues. I can not view/use answered or closed thickets, because the query seems to run minutes. Here are the detailsOsticket 1.9.4Mail Sending: SMTPMail Fetching/Receiving: POPPostfix 2.7.1PHP version: PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli)Operating System: Debian GNU/Linux 6.0Kernel: 2.6.32-042stab092.3Staff side: If I click answerd or closed tickets ostickets hangs for minutes, also somethimes if I want to see open tickets.From the log:# Time: 141103 12# User@Host: custcare @ localhost # Query_time: 33.608921 Lock_time: 0.000180 Rows_sent: 1 Rows_examined: 39230314use custcare;SET timestamp=1415014389;SELECT count(DISTINCT ticket.ticket_id) FROM ost_ticket ticket LEFT JOIN ost_ticket_status status ON (status.id = ticket.status_id) LEFT JOIN ost_user user ON user.id = ticket.user_id LEFT JOIN ost_user_email email ON user.id = email.user_id LEFT JOIN ost_department dept ON ticket.dept_id=dept.dept_id WHERE ( ( ticket.staff_id=2 AND status.state="open") OR ticket.dept_id IN (1,4) ) AND status.state IN ( 'open' ) AND ticket.isanswered=1;# Time: 141103 12# User@Host: custcare @ localhost # Query_time: 35.231994 Lock_time: 0.000489 Rows_sent: 1 Rows_examined: 39230314SET timestamp=1415014394;SELECT count(DISTINCT ticket.ticket_id) FROM ost_ticket ticket LEFT JOIN ost_ticket_status status ON (status.id = ticket.status_id) LEFT JOIN ost_user user ON user.id = ticket.user_id LEFT JOIN ost_user_email email ON user.id = email.user_id LEFT JOIN ost_department dept ON ticket.dept_id=dept.dept_id WHERE ( ( ticket.staff_id=2 AND status.state="open") OR ticket.dept_id IN (1,4) ) AND status.state IN ( 'open' ) AND ticket.isanswered=1;# Time: 141103 12# User@Host: custcare @ localhost # Query_time: 295.592616 Lock_time: 0.050154 Rows_sent: 50 Rows_examined: 39290810SET timestamp=1415014685;SELECT ticket.ticket_id,tlock.lock_id,ticket.`number`,ticket.dept_id,ticket.staff_id,ticket.team_id ,user.name ,email.address as email, dept.dept_name, status.state ,status.name as status,ticket.source,ticket.isoverdue,ticket.isanswered,ticket.created ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate ,CAST(GREATEST(IFNULL(ticket.lastmessage, 0), IFNULL(ticket.closed, 0), IFNULL(ticket.reopened, 0), ticket.created) as datetime) as effective_date ,ticket.created as ticket_created, CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic ,cdata.priority as priority_id, cdata.subject, pri.priority_desc, pri.priority_color FROM ost_ticket ticket LEFT JOIN ost_ticket_status status ON (status.id = ticket.status_id) LEFT JOIN ost_user user ON user.id = ticket.user_id LEFT JOIN ost_user_email email ON user.id = email.user_id LEFT JOIN ost_department dept ON ticket.dept_id=dept.dept_id LEFT JOIN ost_ticket_lock tlock ON (ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW() AND tlock.staff_id!=2) LEFT JOIN ost_staff staff ON (ticket.staff_id=staff.staff_id) LEFT JOIN ost_team team ON (ticket.team_id=team.team_id) LEFT JOIN ost_sla sla ON (ticket.sla_id=sla.id AND sla.isactive=1) LEFT JOIN ost_help_topic topic ON (ticket.topic_id=topic.topic_id) LEFT JOIN ost_help_topic ptopic ON (ptopic.topic_id=topic.topic_pid) LEFT JOIN ost_ticket__cdata cdata ON (cdata.ticket_id = ticket.ticket_id) LEFT JOIN ost_ticket_priority pri ON (pri.priority_id = cdata.priority) WHERE ( ( ticket.staff_id=2 AND status.state="open") OR ticket.dept_id IN (1,4) ) AND status.state IN ( 'open' ) AND ticket.isanswered=1 ORDER BY ticket.lastresponse DESC, ticket.created DESC LIMIT 0,50;# Time: 141103 12# User@Host: custcare @ localhost # Query_time: 292.764883 Lock_time: 0.000932 Rows_sent: 50 Rows_examined: 39290810SET timestamp=1415014687;SELECT ticket.ticket_id,tlock.lock_id,ticket.`number`,ticket.dept_id,ticket.staff_id,ticket.team_id ,user.name ,email.address as email, dept.dept_name, status.state ,status.name as status,ticket.source,ticket.isoverdue,ticket.isanswered,ticket.created ,IF(ticket.duedate IS NULL,IF(sla.id IS NULL, NULL, DATE_ADD(ticket.created, INTERVAL sla.grace_period HOUR)), ticket.duedate) as duedate ,CAST(GREATEST(IFNULL(ticket.lastmessage, 0), IFNULL(ticket.closed, 0), IFNULL(ticket.reopened, 0), ticket.created) as datetime) as effective_date ,ticket.created as ticket_created, CONCAT_WS(" ", staff.firstname, staff.lastname) as staff, team.name as team ,IF(staff.staff_id IS NULL,team.name,CONCAT_WS(" ", staff.lastname, staff.firstname)) as assigned ,IF(ptopic.topic_pid IS NULL, topic.topic, CONCAT_WS(" / ", ptopic.topic, topic.topic)) as helptopic ,cdata.priority as priority_id, cdata.subject, pri.priority_desc, pri.priority_color FROM ost_ticket ticket LEFT JOIN ost_ticket_status status ON (status.id = ticket.status_id) LEFT JOIN ost_user user ON user.id = ticket.user_id LEFT JOIN ost_user_email email ON user.id = email.user_id LEFT JOIN ost_department dept ON ticket.dept_id=dept.dept_id LEFT JOIN ost_ticket_lock tlock ON (ticket.ticket_id=tlock.ticket_id AND tlock.expire>NOW() AND tlock.staff_id!=2) LEFT JOIN ost_staff staff ON (ticket.staff_id=staff.staff_id) LEFT JOIN ost_team team ON (ticket.team_id=team.team_id) LEFT JOIN ost_sla sla ON (ticket.sla_id=sla.id AND sla.isactive=1) LEFT JOIN ost_help_topic topic ON (ticket.topic_id=topic.topic_id) LEFT JOIN ost_help_topic ptopic ON (ptopic.topic_id=topic.topic_pid) LEFT JOIN ost_ticket__cdata cdata ON (cdata.ticket_id = ticket.ticket_id) LEFT JOIN ost_ticket_priority pri ON (pri.priority_id = cdata.priority) WHERE ( ( ticket.staff_id=2 AND status.state="open") OR ticket.dept_id IN (1,4) ) AND status.state IN ( 'open' ) AND ticket.isanswered=1 ORDER BY ticket.lastresponse DESC, ticket.created DESC LIMIT 0,50;