11/05/2012 by Nitesh

How to Optimize and Repair MySQL tables

Very Often when we deal with large amount of data in MySQl table, we need to Optimize and repair MySQL tables. Here are the MySQL Queries to do the same:

Optimize Table: OPTIMIZE TABLE TBL_NAME

Repair Table: REPAIR TABLE TBL_NAME

The Other way of doing this is to follow the below steps.

  • Go to PhpMyAdmin
  • Select the table and hit Operations tab
  • Scroll to bottom of page and click Repair Table/Optimize Table.

Here is a screenshot of the same.

#MySQL#PhP#Utilities