Overview
This document describes briefly why customers should not perform any database maintenance or tuning operations manually for M-Files databases, noting a couple of exceptions.
Impacted Products and Versions
All M-Files versions.
Solution
For Firebird based vaults, no operations against the Firebird databases should be performed. Vault backups should be taken using the M-Files Admin built-in functionality.
For Microsoft SQL server-based vaults, the customer should only perform the following operations:
- Database backups, see more here: M-Files Backup Policy.pdf
- DBCC CHECKDB but only in read-only mode, if any errors, please contact M-Files support before attempting any fixes.
- Database shrink - but only if a significant amount of data has been removed and the database is not expected to grow back within reasonable time. Typically this operation is not needed and should not be run. If in doubt, contact M-Files support.
M-Files maintains the SQL database when it runs the thorough optimization which is scheduled to run weekly - this includes index rebuilds/reorganizations and statistics updates as necessary as well as other operations.
Depending on the SQL server edition, the above operations may not only be unnecessary, but they may even cause serious problems, preventing the thorough optimization from being run and causing timeouts or lock failures visible to end users.
Database tuning wizards or similar technologies MUST NOT be used to alter the database (see more here). They may in fact degrade performance by creating additional indices. When new M-Files versions become available, any unexpected index may cause upgrade failure and render the system unavailable as the upgrades from time to time may modify the database layout.
Reference Documents
Microsoft provides an explanation on indexing operations here: https://docs.microsoft.com/en-us/sql/relational-databases/indexes/perform-index-operations-online?view=sql-server-ver15
