简体   繁体   中英

How to delete empty partitions in cratedb?

Cratedb:4.xx

We have one table in which we are doing partition based on day. we will take snapshot of tables based on that partition and after taking backup we delete the data of that day.

Due to multiple partition, shards count is more than 2000 and configured shard is 6

I have observed that old partitions have no data but still exist in database. So it will take more time to become healthy and available to write data after restarting the crate.

在此处输入图片说明

So Is there any way to delete those partition?

Is there any way to stop replication of data on startup the cluster? cause it takes too much time to become healthy cluster and due to that table is not writable until that process finished.

Any solution for this issue will be great help?

You should be able to delete empty partitions with a DELETE with an exact match on the partitioned by column. Like DELETE FROM <tbl> WHERE <partitioned_by_column> = <value>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM