With the long-term use of MySQL, there will certainly be some problems, in general, the MySQL table can not be accessed, it is possible to repair the table, optimized to reduce disk space, convenient backup.
Table table_name // table table_name // optimization table
Repair table is used to repair corrupted tables.
Optimize table is used to reclaim unused database space, and when the data rows on the table are deleted, the disk space occupied is not immediately reclaimed, the space is reclaimed after the Optimize table command is used, and the data rows on the disk are re-ordered (note: on disk, Rather than a database).
You do not need to run optimize table most of the time, only after you have deleted the data rows in bulk or periodically (once a week or once a month) to perform a data table optimization operation only for those specific tables.
MySQL optimized table and Repair table commands (repair table, optimize table)