Skip to main content

Managing shard groups in a ClickHouse® cluster

To simplify working with data, you can combine shards into groups and place tables in the required group. This allows you to specify the group name instead of listing individual shards when creating tables and executing queries.

After creating a shard group you can edit or delete it.

Create a shard group

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the database cluster page → Shard Groups tab.
  4. Click Create group.
  5. Optional: change the group name.
  6. Select the shards you want to add to the group.
  7. Optional: enter a group description.
  8. Click Create.

Edit a shard group

You can add shards to a group or remove them from a group. A group must contain at least one shard. It is not possible to remove all shards from a group.

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the database cluster page → Shard Groups tab.
  4. In the group menu, click Edit.
  5. To add a shard to a group, select the shard's checkbox.
  6. To remove a shard from a group, clear the shard's checkbox.
  7. Optional: change the group description.
  8. 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 unusable. You can delete such tables before or after deleting the shard group.

  1. In the Dashboard, on the top menu, click Products and select Managed Databases.
  2. Open the Active tab.
  3. Open the database cluster page → Shard Groups tab.
  4. In the group menu, click Delete.
  5. Click Delete to confirm the deletion.

ClickHouse® is a registered trademark of ClickHouse, Inc. https://clickhouse.com.