if that is still an issue, did you try this? https://www.thegeekstuff.com/2016/04/mysql-optimize-table/