diff --git a/content/en/altinity-kb-setup-and-maintenance/alters.md b/content/en/altinity-kb-setup-and-maintenance/alters.md index 85f8b90627..bd7d72919d 100644 --- a/content/en/altinity-kb-setup-and-maintenance/alters.md +++ b/content/en/altinity-kb-setup-and-maintenance/alters.md @@ -109,6 +109,16 @@ Will trigger mutation, which will materialize this column. Lightweight, it's only about changing of table metadata and removing corresponding files from filesystem. For Compact parts it will trigger merge, which can be heavy. [issue](https://github.com/ClickHouse/ClickHouse/issues/27502) +#### DROP DETACHED command +The DROP DETACHED command in ClickHouse® is used to remove parts or partitions that have previously been detached (i.e., moved to the detached directory and forgotten by the server). The syntax is: + +{{% alert title="Warning" color="warning" %}} +Be careful before dropping any detached part or partition. Validate that data is no longer needed and keep a backup before running destructive commands. +{{% /alert %}} + +```sql +ALTER TABLE table_name [ON CLUSTER cluster] DROP DETACHED PARTITION|PART ALL|partition_expr +``` #### MODIFY COLUMN (DATE TYPE)