1. Knowledge Base
  2. >
  3. Optimizing MySQL Database Using phpMyAdmin

Optimizing MySQL Database Using phpMyAdmin

Repair Database


In phpMyAdmin, Optimize Table should be used if you have deleted a large part of a table or made many changes to a table with variable-length rows, such as VARCHAR, TEXT, BLOB, or VARBINARY columns. Deleted rows are maintained in the linked list, and insert operations reuse the old row positions. You can use Optimize Table to reclaim unused space and defragment the data file for optimal performance. If there are a lot of changes made to a table, optimizing the table can sometimes significantly improve performance.

Step 1: Launch phpMyAdmin

To access phpMyAdmin, please refer to the following articles for the complete set of instructions depending on your hosting control panel.

Step 2: Optimize Tables

  1. In the phpMyAdmin homepage, select the database you want to optimize from the list in the left pane, which should take you to the Structure tab by default.

    phpMyAdmin - Select Database

  2. An expanded list of tables will appear on the left and wider in the right pane.

    phpMyAdmin - Collapsed Tables

  3. Put a checkmark on the table(s) you wish to optimize.
  4. Click the dropdown menu at the bottom that says With selected and look for Table Maintenance.
  5. Select Optimize Table from the list to initiate the optimization.

    phpMyAdmin - Optimize Table

  6. A confirmation prompt will appear on top, notifying you of the successfully executed query.

    Confirmation Prompt