Hello,
I have an old osTicket 1.9.12. Before updating, I made a copy of the system to test the update. I copied the database with an export and imported it in a new database. Only file_chunk was a problem, because its to large.
The update of the system went well. The only issue is, that the display of the ticket overview (queue?) takes very long, if there are more than a few hundreds of tickets. All below 500 is OK, but 6000 for example will take 2 minutes to load.
I have read in the forum about the patch in class.searchphp, converting to InnoDB and other tips. Nothing has worked.
The database and osTicket are running on the same sever as the current 1.9.12 version. The old version show the same view in milliseconds, the new one needs 2 minutes.
Before upgrading the productive system, I want understand and fixing the issue. Maybe its something I have done wrong when copying the database?
This is a query, which takes 2 minutes to load, the result are 6392 tickets:
SELECT A1.
number
ASnumber
, A1.ticket_id
ASticket_id
, A1.source
ASsource
, A1.lastupdate
ASlastupdate
, B2.subject
AScdata__subject
, A1.isoverdue
ASisoverdue
, B4.name
ASuser__name
, B2.priority
AScdata__priority
, B5.firstname
ASstaff__firstname
, B5.lastname
ASstaff__lastname
, B6.name
ASteam__name
, A1.team_id
ASteam_id
, A1.isanswered
= '0' AS2GkBZxz
, (SELECT COUNT(R0.id
) AScount
FROMots_thread
Q7 JOINots_ticket
Q8 ON (Q7.object_type
= 'T' AND Q7.object_id
= Q8.ticket_id
) LEFT JOINots_thread_entry
R0 ON (Q7.id
= R0.thread_id
) WHERE Q8.ticket_id
= A1.ticket_id
AND NOT R0.flags
& 4 != 0) AS _thread_count, (SELECT COUNT(R1.id
) AScount
FROMots_thread
Q7 JOINots_ticket
Q8 ON (Q7.object_type
= 'T' AND Q7.object_id
= Q8.ticket_id
) LEFT JOINots_thread_entry
R0 ON (Q7.id
= R0.thread_id
) LEFT JOINots_attachment
R1 ON (R1.type
= 'H' AND R0.id
= R1.object_id
) WHERE Q8.ticket_id
= A1.ticket_id
AND R1.inline
= 0) AS _att_count, B7.expire
> NOW() AND NOT B7.staff_id
= 1 AS_locked
, (SELECT COUNT(R0.id
) AScount
FROMots_thread
Q7 JOINots_ticket
Q8 ON (Q7.object_type
= 'T' AND Q7.object_id
= Q8.ticket_id
) LEFT JOINots_thread_collaborator
R0 ON (Q7.id
= R0.thread_id
) WHERE Q8.ticket_id
= A1.ticket_id
) AS _collabs, COALESCE(B5.firstname
, B5.lastname
, B6.name
, 'zzz') ASassignee
FROMots_ticket
A1 JOINots_ticket_status
A2 ON (A1.status_id
= A2.id
) LEFT JOINots_thread
A3 ON (A3.object_type
= 'T' AND A1.ticket_id
= A3.object_id
) LEFT JOINots_thread_referral
A4 ON (A3.id
= A4.thread_id
) LEFT JOINots_staff
A5 ON (A4.object_type
= 'S' AND A4.object_id
= A5.staff_id
) LEFT JOINots_thread
A6 ON (A1.ticket_id
= A6.object_id
AND A6.object_type
= 'C') LEFT JOINots_thread_referral
A7 ON (A6.id
= A7.thread_id
) LEFT JOINots_staff
A8 ON (A7.object_type
= 'S' AND A7.object_id
= A8.staff_id
) LEFT JOINots_department
B0 ON (A4.object_type
= 'D' AND A4.object_id
= B0.id
) LEFT JOINots_department
B1 ON (A7.object_type
= 'D' AND A7.object_id
= B1.id
) LEFT JOINots_ticket__cdata
B2 ON (A1.ticket_id
= B2.ticket_id
) LEFT JOINots_ticket_priority
B3 ON (B2.priority
= B3.priority_id
) LEFT JOINots_user
B4 ON (A1.user_id
= B4.id
) LEFT JOINots_staff
B5 ON (A1.staff_id
= B5.staff_id
) LEFT JOINots_team
B6 ON (A1.team_id
= B6.team_id
) LEFT JOINots_lock
B7 ON (A1.lock_id
= B7.lock_id
) WHERE A2.state
= 'open' AND ((A2.state
= 'open' AND (A1.staff_id
= 1 OR A5.staff_id
= 1 OR A6.object_type
= 'C' AND A8.staff_id
= 1)) OR A1.dept_id
IN (1, 2, 3, 4) OR B0.id
IN (1, 2, 3, 4) OR A6.object_type
= 'C' AND B1.id
IN (1, 2, 3, 4)) AND (A1.ticket_pid
IS NULL OR A1.flags
& 8 != 0) GROUP BY A1.ticket_id
ORDER BY B3.priority_urgency
ASC, A1.lastupdate
DESC LIMIT 50
Any ideas?
best regards
Horst