Defragment to Recover Space in MYSQL - 7-Views
Defragment to Recover Space in MYSQL
If our application is performing a lot of update delete operations on a certain table then there is high possibility that it contains fragmented space.
The OPTIMIZE TABLE statement allows MySQL DBAs to reorganize physical table storage in order to achieve three main goals:
- Shrinks the data pages
- Shrinks index pages
- Computes Fresh Index Statistics
OPTIMIZE TABLE table_name
OPTIMIZE TABLE can be time-consuming depending on the size of the data and indexes. But, running OPTIMIZE TABLE does not harm to the data and indexes get rebuilt.