1st of all please do all this on your own risk, i will just tell my story without any warranty or responsability
Recently i was asked to help with an osticket database which was about 3GB and sometimes was experiencing slow loading
what i did?
- BACKUP 🙂
- opened phpmyadmin , select database then click Search tab
- wrote a term in the search box which was used in the tickets ( examples: skype, dropbox ) and which is very unlikely to appear in osticket database structure / content
- i found out that tables ost_file ( + ost_file_chunk), ost_thread_entry, ost_thread_entry_mail, ost_ticket_data
- i have deleted in ost file records many years behind, then write down what was the lowest id value remaining in the table
- i have deleted all the rows in ost_file_chunk associated with the deleted id at point 5
..at this point you will have a big decrease of space used (my case recalculated over night – either ost maintainance operation either cpanel optimization )
- you want also to delete ticket history? i went to ost_thread_entry delete all tickets with date lower than a specific date
- i deleted also close to 10k rows in ost_thread_entry_mail
..since this operation is done onece every 5/10 years i didnt put in a script …
So far, the installation works flawless!