Database Tools

This topic explains the database tools available in the Database menu. These tools allow you to perform database maintenance, upgrade database information and fix problems.

Database Diagnosis

To test the database file for potential problems and to maintain optimal performance, you should run the database diagnosis frequently. See the Database Diagnosis topic for more information.

Compact and Optimize

By default, IMatch keeps unallocated data blocks in the database and reuses them when new information is stored. This means the database file on disk does not shrink when you remove a large number of files from your database. After heavy usage, e.g. adding or removing thousands of files or after working with your database for some weeks, you may want to run a Compact operation to remove fragmentation and unused data from the database file. This not only streamlines the internal database structure and improves performance, but also shrinks the database file.

Running this command after you have made many changes to your database (e.g. adding, updating or removing thousands of files) improves the overall performance of IMatch considerably. If your database is stored on a SSD (recommended!), you don't need to optimize as often. File fragmentation is not relevant on non-spinning disks.

How It Works

During the compact and optimize process, the database system creates a new, streamlined version of the database. All slack is removed, indexes are optimized, performance metrics are recalculated etc.

The new database is created in the temporary folder on your system, which may be a different drive than the drive where the original database is stored. IMatch checks the available disk space on the drive containing the TEMP folder to make sure that there is sufficient room.

When the process finishes successfully, the new and optimized database is copied 'over' the original database to replace it.

To find the TEMP folder for your user account, type %temp% into the Windows Explorer address bar and press Enter.

Repair Database

Sometimes a database becomes corrupted or damaged. This may happen when you experience a power failure while Windows was writing data to the database file, or may be caused by unreliable USB drives or sticks, network connections or similar. See this topic for more information. Database damage is rare, but not impossible. The best strategy is to backup your database and other important files at least daily.

See Backup for detailed information about how to backup and secure your data.

Usually the built-in diagnosis can not only detects damage but can also repair it. But when you cannot longer open a database, you cannot run a diagnosis. For these cases, use the separate Repair Database command available in the Database > Tools menu.

This command applies a variety of techniques to the database file, trying to fix the damage and corruption. This can work if the damage is only in non-vital parts of the database file. Or when only index data is corrupted, which can be rebuilt from the actual data. If internal database structures are corrupted, the database cannot be repaired and you have to restore the last working backup.

If you have a backup of your database, restoring it is the best solution. Use the Repair Database command only when no backup is available.

Rebuild Visual Query Data

This command re-creates the data which is used by IMatch to run searches for visually similar images and also the sketch match feature. Rebuilding this information may be required when IMatch introduces newer versions of the visual query feature.

Depending on the size of your database, this command may take several minutes to complete.

Rebuild Timeline

This command re-creates the timeline data stored in the database. This can be required when the timeline becomes damaged (unlikely) or when IMatch introduces changes in the timeline in later versions.

Clear Processing Queues

IMatch processes file imports, metadata import and export and other tasks in the background. To control these operations, IMatch maintains a queue in the database which contains a list of files to process, and the operations to perform.

You can also open this dialog by clicking into the banner at the top of the Info & Activity Panel or into the progress indicator in the status bar at the bottom of the IMatch window.

Under some rare conditions, e.g. problematic network connections or swapping hard disks, some entries in the queue may become stuck. IMatch then continuously tries to process these files, even when these files no longer exist.

Or you may have accidentally scheduled files for processing or face recognition and now want to undo that.

For these cases, use this command to clear the processing queue.

This command can also be used to cancel pending metadata changes. IMatch considers the metadata of all files as written and current after running this command.

IMatch assigns the files affected by this command to a special category. The name of this category is displayed after the command has completed. Use this category to review the files and optionally process them again at a later time.

Cancelling Face Recognition

If you experience that face recognition running in the background is causing your PC to become very slow, you can use this feature to cancel pending images.

Maybe make adjustments under Edit > Preferences > Application: Process Control to reduce the computing resources face recognition is allowed to use. Then select the files for which you want to perform face recognition and start the process again via the menu command.

You need to close and re-open the database after clearing the processing queues.

Delete Database

Deleting a database involves more than just deleting the database file (with the .imd*) extension. IMatch maintains temporary files for each database and also a per-database file cache and settings. These files and settings also need to be deleted in order to free as much disk space as possible.

If you want to delete a database, use the convenient Delete Database command to delete a database and all associated permanent and temporary files and settings.

This command will not delete the files managed by the database.