v.20.12New Feature
Introduce ALTER TABLE ... DROP|DETACH PART Query
Introduce the query ALTER TABLE ... DROP|DETACH PART 'part_name'. #15511 (nvartolomei).Why it matters
This feature allows users to explicitly drop or detach individual parts (data segments) of a MergeTree table, providing finer control over data management. It helps in cases where specific parts need to be removed or detached without affecting the entire table or requiring complex workaround procedures.How to use it
Users can execute the following queries to manage parts of a table:ALTER TABLE table_name DROP PART 'part_name';
ALTER TABLE table_name DETACH PART 'part_name';Replace
table_name with the target table and part_name with the exact name of the part to be dropped or detached.