New feature - $modx->db->optimize($table_name)
Improved - Table optimize each clear cache