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.

  1. On the top menu bar, choose Database Management.
  2. On the displayed Objects page, select Tables, locate the target table, and choose More > Maintain > Optimize in the Operation column.
  3. In the displayed dialog box, click Yes.