2011-08-16, 05:51 PM
INTRODUCTION
If you are not familiar with database optimization yet, what it does is basically reclaim the space filled by empty spaces in your database. And per Everett777's request, I will demonstrate how you can set up a task to automatically optimize all database tables. For the purpose of this tutorial I will set it to run once a week, which should be enough, but feel free to change it to your needs!
TUTORIAL
1. Upload the file attached below to the ./inc/tasks/ directory.
[attachment=23834]
2. Go to Admin CP > Tools & Maintenance > Task Manager > Add New Task.
3. Enter "Optimize All Database Tables" in Title.
4. Enter "Optimizes all databases tables." in Short Description.
5. Select "optimizedb.php" from Task.
6. Enter "*" in Time: Minutes, Time: Hours and Time: Days of Month. (as it should be by default).
7. Select "Sunday" from Time: Weekdays.
8. Select "Every Month" from Time: Months.
9. Set Enable Logging? and Task enabled? to "Yes".
[attachment=23832]
CONCLUSION
After setting up the task, you will save a lot of space filled by empty spaces that added up during time. And you won't even need to do anything! But if you prefer to do it manually, refer to Malcolm's tutorial which explains what database optimization is, why to do it and how to do it in great detail.
If you are not familiar with database optimization yet, what it does is basically reclaim the space filled by empty spaces in your database. And per Everett777's request, I will demonstrate how you can set up a task to automatically optimize all database tables. For the purpose of this tutorial I will set it to run once a week, which should be enough, but feel free to change it to your needs!
TUTORIAL
1. Upload the file attached below to the ./inc/tasks/ directory.
[attachment=23834]
2. Go to Admin CP > Tools & Maintenance > Task Manager > Add New Task.
3. Enter "Optimize All Database Tables" in Title.
4. Enter "Optimizes all databases tables." in Short Description.
5. Select "optimizedb.php" from Task.
6. Enter "*" in Time: Minutes, Time: Hours and Time: Days of Month. (as it should be by default).
7. Select "Sunday" from Time: Weekdays.
8. Select "Every Month" from Time: Months.
9. Set Enable Logging? and Task enabled? to "Yes".
[attachment=23832]
CONCLUSION
After setting up the task, you will save a lot of space filled by empty spaces that added up during time. And you won't even need to do anything! But if you prefer to do it manually, refer to Malcolm's tutorial which explains what database optimization is, why to do it and how to do it in great detail.