Created
January 11, 2019 13:17
-
-
Save filimonov/9f210401b4c2ce16fb0d0c516c8eedd0 to your computer and use it in GitHub Desktop.
Create queries to detach all the partitions in clickhouse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select 'ALTER TABLE '||database||'.'||table||' DETACH PARTITION '||partition||';' from system.parts group by database,table,partition ORDER BY database, table, partition FORMAT TSVRaw; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment