Removing a partition
A partition can be removed with the "dropPartition" Upgrade Tool command. This deletes all documents contained within the partition. It is therefore suitable to remove large amounts of documents from an ImageMaster system.
This operation is fast even if performed on a large partition. If the appropriate indices do not exist in the system, precondition checks however may take long to execute.
Example:
dropPartition PARTITION_2015
ImageMaster features excluding the support of partition dropping
Some ImageMaster features depend on the integrity of references between rows in different database partitions. This makes these features incompatible with the dropping of database partitions. It is therefore essential that the possible use of "dropPartition" for mass-deletion of documents is decided already in the planning of an ImageMaster system so the affected features can be avoided. Otherwise it may not be possible to safely drop a partition later.
The following features are affected:
Feature |
Restriction and Consequences |
---|---|
Folder Structure |
Dropping a partition will fail if it contains a folder entry or a document referenced by a folder entry. This feature should therefore not be used in systems where partitions will be dropped. |
Master Data Links |
Dropping a partition will fail if it contains documents with non-dynamic master data links (even if the source is in the same partition). It should be ensured that all master data documents are created in partitions that will never be dropped to avoid this problem. |
Single Instance Archiving |
The initial database model must be created without the "SingleInstancePartition" database option, otherwise dropping partitions is impossible. This is the case even if Single Instancing is never actually used in the system! Starting with release 9.8.1, the "SingleInstancePartition" option is off by default when creating new database models. |
Precondition checks
The generated database script contains checks to ensure that dropping the partition does not violate any retention restrictions of contained documents and that no conflicting ImageMaster features are in use. If a precondition check fails, the script execution will abort.
These precondition checks require additional database indices for a fast execution that are not part of the standard ImageMaster database model. The command will display an appropriate message if such indices are needed and a script to create them can be generated using the "dropPartition" command with the --create-check-indices option. It is also possible to just ignore missing indices and generate the appropriate script without them. This is recommended only for small databases where the impact of a missing index is low.
See Dropping a partition in [SM Upgrade Tool] for the options related to precondition checks in the "dropPartition" command.
List-partitioning
All documents with a partition key associated with the partition will be deleted.
Range-partitioning
All documents with a partition key in the range of the partition will be deleted. It is only possible to drop the partition at the low or high end of the partition list. It is impossible to drop a partition that exists between other partitions.