This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15265|Reply: 1

[Source] Check whether the mysql table is corrupted, repaired, or optimized

[Copy link]
Posted on 11/15/2017 1:33:17 PM | | | |


The command to ask if the mysql table is corrupted is as follows:
# CHECK TABLE table name

Generally, if the mysql table is inaccessible, the table can be repaired and the disk space will be reduced when optimized. Convenient backup.
The table repair and optimization commands are as follows:
#REPAIR TABLE 'table_name' Fix table
#OPTIMIZE TABLE 'table_name' Optimized table


REPAIR TABLE is used to repair broken tables.
OPTIMIZE TABLE is used to reclaim idle database space, when the data rows on the table are deleted, the disk space occupied is not immediately reclaimed, after using the OPTIMIZE TABLE command, these spaces will be reclaimed, and the data rows on the disk will be rearranged (note: it is on disk, not database).

Most of the time, you don't need to run OPTIMIZE TABLE, just run the OPTIMIZE TABLE after deleting columns in bulk, or on a regular basis (weekly or monthly) for those specific tables.




Previous:MySQL views SQL statements that are executed in real time
Next:I was just trying to increase my MB
 Landlord| Posted on 2/23/2018 10:16:35 AM |
MySQL table repair tip "The storage engine for the table doesn't support re...
http://www.itsvse.com/thread-4518-1-1.html
(Source: Architect)
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com