Database Table Optimization
ZiziCache provides tools for the safe optimization of database tables, improving query performance and reducing data fragmentation.
Types of Table Optimization
The plugin recognizes and optimizes different types of tables:
- MyISAM tables: Full optimization with
OPTIMIZE TABLE - InnoDB tables: Optimization only in case of fragmentation
- Fragmented tables: Priority optimization
Safety Measures
The following measures are implemented for safety:
- Size limits: Tables >500MB are skipped
- Transactions: Use of transactions for MyISAM tables
- Timeouts: Protection against long optimizations
- Batch processing: Gradual processing of tables
Optimization Statistics
After optimization, the plugin provides detailed statistics:
- Number of optimized tables
- Number of skipped tables
- Space saved in bytes
- Optimization time for each table
- Error messages (if any occur)
Automatic Optimization
Table optimization can be included in automatic cleaning by setting the parameter db_optimize_tables to true.