Optimize Database Tables
OPTIMIZE TABLE is a MySQL command that reorganizes the physical storage of table data and associated index data, to reduce storage space and improve I/O efficiency when accessing tables.
- Checks if tables need to be optimized
- If so, it starts optimizing them one by one
- It keeps track of how much disk size is gained
When do I need this?
- When your website is used a lot;
- If you want to optimize as much as you can;
- If you want to reduce disk size;
- If you want to improve performance.
Real life examples
- On a high traffic website with a database of 180MB (4637 pages), 89MB was gained.
- On a low traffic website with a database of 20MB (272 pages), 4MB was gained.
- concrete5 8.0.0+
- PHP 5.6+