---
title: "Managing shard groups in a ClickHouse® cluster"
sidebar_label: "Managing shard groups"
description: "How to create, edit, and delete a shard group"
sidebar_position: 9
---

import {CustomTable} from '@selectel/docux/components';
import MoreVerticalIcon from '@selectel/docux/icons/more-vertical';
import Formbricks from '@theme/MDXComponents/Formbricks';

# Managing shard groups in a ClickHouse® cluster

To simplify working with data, you can combine [shards](/managed-databases/clickhouse/about-node-groups.mdx#shard) 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](#create) you can [edit](#change) or [delete it](#delete).

## Create a shard group \{#create}

1. In the [Dashboard](https://my.selectel.ru/vpc/default/dbaas/), 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 \{#change}

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](https://my.selectel.ru/vpc/default/dbaas/), 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 <MoreVerticalIcon /> 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 \{#delete}

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](https://my.selectel.ru/vpc/default/dbaas/), 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 <MoreVerticalIcon /> group menu, click **Delete**.
5. Click **Delete** to confirm the deletion.

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

<Formbricks />
