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:
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.