Maintaining a Table
Scenarios
While working with MySQL databases, you do a lot of changes such as data insert, update, and deletion, which may cause table fragmentation. As a result, the database server performance is deteriorated. To handle this, periodic maintenance is required.
Functions
- Optimize
Allows you to optimize tables using the OPTIMIZE TABLE statement and sort out fragmented files for later use.
During the optimization, a read-only lock will be added to target tables. Therefore, optimizing tables during off-peak hours is recommended.
- Analyze
Allows you to analyze tables using the ANALYZE TABLE statement. During the analysis, a read-only lock is added to the tables. Tables can only be read during the analysis.
Procedure
The following operations show how to optimize a database table. The procedure for analyzing tables is similar.
- On the top menu bar, choose Database Management.
- On the displayed Objects page, select Tables, locate the target table, and choose More > Maintain > Optimize in the Operation column.
- In the displayed dialog box, click Yes.
Last Article: Dropping a Table
Next Article: CloudDBA
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.