Managing shard groups in a ClickHouse cluster
To simplify data work, you can combine shards into groups and place tables in the required group. This allows you to specify a group name instead of listing individual shards when creating tables and running queries.
After creating a shard group, you can edit or delete it.
Create a shard group
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the database cluster page → Shard Groups tab.
- Click Create group.
- Optional: change the group name.
- Select the shards you want to add to the group.
- Optional: enter a group description.
- Click Create.
Edit a shard group
You can add shards to a group or remove them from it. A group must contain at least one shard. You cannot remove all shards from a group.
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the database cluster page → Shard Groups tab.
- In the group menu, click Edit.
- To add a shard to a group, select the shard's checkbox.
- To remove a shard from a group, clear the shard's checkbox.
- Optional: change the group description.
- Click Save.
Delete a shard group
Deleting a group does not delete the shards within it; they remain in the cluster. Tables created using this group will be preserved but will become non-functional. You can delete such tables before or after deleting a shard group.
- In the Dashboard, on the top menu, click Products and select Managed Databases.
- Open the Active tab.
- Open the database cluster page → Shard Groups tab.
- In the group menu, click Delete.
- Click Delete to confirm the deletion.