The Optimize Database (Thorough) operation consists of up to 13 steps. M-Files Admin shows the progress of the operation with a step number and name.
The steps that run depend on the vault database engine, vault settings, and whether the optimization starts manually or by a schedule.
Steps that run in each context
The following table shows which steps run with different database engines and optimization methods.
Not all steps run during every optimization. Therefore, the step numbers shown in M-Files Admin can skip some values. For example, with Microsoft SQL Server, the operation proceeds from step 7 to step 10.
| Step | Name in M-Files Admin | Firebird, manual | Firebird, scheduled | SQL server, manual | SQL server, scheduled |
|---|---|---|---|---|---|
| 1 | Taking the vault offline | Yes | Yes | Conditional* | Conditional* |
| 2 | Rebuilding metadata indexes | Yes | Yes | Yes | Yes |
| 3 | Recalculating relevance scores for objects | Yes | Yes | Yes | Yes |
| 4 | Cleaning out unused access control lists | Yes | Yes | Yes | Yes |
| 5 | Clearing the change logs of object types | Yes | Yes | Yes | Yes |
| 6 | Checking the full-text search compatibility of views | Yes | Yes | Yes | Yes |
| 7 | Upgrading the vault database for improving performance | Yes | Yes | Yes | Yes |
| 8 | Backing up the metadata | Yes | Yes | No | No |
| 9 | Restoring the metadata | Yes | Yes | No | No |
| 10 | Rebuilding database indexes | No | No | Yes | Yes |
| 11 | Updating the statistics for database objects | No | No | Yes | Yes |
| 12 | (not shown) | Not shown | Not shown | Not shown | Not shown |
| 13 | Finalizing the operation | Yes | Yes | Yes | Yes |
- Delete the files of destroyed objects is enabled.
- The file data is not stored in the vault database.
Optimization steps
- Taking the vault offlineM-Files takes the vault offline.
- Firebird: This step always runs.
- Microsoft SQL Server: This step runs only if Delete the files of destroyed objects is enabled and the file data is not saved in the vault database.
- Rebuilding metadata indexes
M-Files performs these tasks:
- Clears old entries from the quick indexing table of external repositories.
- Resets the help tables.
- Deletes uncommitted temporary file data.
- Resets the next file ID for uploads.
- Changes the local time zone of the vault. This task runs only during manual optimization with Firebird.
- Rebuilds the metadata indexes.
- Recalculating relevance scores for objects
M-Files recalculates the relevance scores for objects.
With Microsoft SQL Server, the behavior depends on the default search engine:- dtSearch: The vault goes offline and comes back online during this step.
- Smart Search or IDOL: The vault stays online.
- Cleaning out unused access control lists
M-Files removes unused access control lists.
- Clearing the change logs of object types
M-Files removes old records from the change logs of object types.
- Checking the full-text search compatibility of views
M-Files checks the full-text search compatibility of views.
- Upgrading the vault database for improving performance
M-Files upgrades the vault database to improve performance. With Microsoft SQL Server, the vault goes offline and comes back online during this step if the database structure must change.
- Backing up the metadata
M-Files backs up the metadata.Note: This step runs only with Firebird.
- Restoring the metadata
M-Files restores the metadata.Note: This step runs only with Firebird.
- Rebuilding database indexes
M-Files rebuilds the database indexes.Note: This step runs only with Microsoft SQL Server.
- Updating the statistics for database objects
M-Files updates the statistics for database objects.Note: This step runs only with Microsoft SQL Server.
- Step not shown
M-Files Admin does not show step 12. The operation continues to step 13.
- Finalizing the operation
M-Files performs these tasks:
- Optimizes the process memory.
- Brings the vault online.
- Starts the compression of the full-text search indexes.
