Removing Orphaned Partitions that are not Needed

If you have orphaned partitions that you no longer need, you can remove all of them at once. To do so, first check which partitions will be removed:

EXPLAIN CLEAR ORPHAN DATABASES;

To remove all orphaned partitions, run

CLEAR ORPHAN DATABASES;

Make sure to have run SHOW PARTITIONS and SHOW CLUSTER STATUS and have verified that all partitions are accounted for before doing this.

Note: CLEAR ORPHAN DATABASES can’t be undone.

Last modified: July 5, 2021

Was this article helpful?