Warehouses

For example, if you call `clusterAllReplicas(default, system, processes)` from service 1, only processes running on service 1 are returned.
To query across all services in the warehouse, use the `all_groups.default` cluster name instead:

```
SELECT * FROM clusterAllReplicas('all_groups.default', system, processes)
```

Note

Secondary single-node services can scale vertically, while primary single-node services cannot.

## Limitations[​](#limitations "Direct link to Limitations")

### Workload isolation limitations[​](#workload-isolation-limitations "Direct link to Workload isolation limitations")

Some workloads can't be isolated to specific services; there are edge cases where one workload in one service will affect another service in the warehouse. These include:

- **All read-write services handle background merge operations by default.** When inserting data to ClickHouse, the database at first inserts the data to some staging partitions, and then performs merges in the background. These merges can consume memory and CPU resources. When two read-write services share the same storage, they both are performing background operations. That means that there can be a situation where there is an `INSERT` query in Service 1, but the merge operation is completed by Service 2.
  Note that read-only services don't execute background merges, thus they don't spend their resources on this operation. Our support has the ability to turn off merges on a service.
- **All read-write services are performing S3Queue table engine insert operations.** When creating a S3Queue table on a read/write service, all other read/write services on the warehouse may perform reading data from S3 and writing data to the database.
- **Inserts on one read-write service can prevent another read-write service from idling if idling is enabled.** There are situations where
  one service performs background merge operations for another service. Those background operations can prevent the second service from idling. Once the background operations are finished, the service will idled. Read-only services aren't affected.

### Helpful Callouts[​](#callouts "Direct link to Helpful Callouts")

- **`CREATE`/`RENAME`/`DROP DATABASE` queries could be blocked by idled/stopped services by default.** If these queries are executed when the service is idled or stopped, these queries can hang. To bypass this, you can run database management queries with [`settings distributed_ddl_task_timeout=0`](/docs/operations/settings/settings#distributed_ddl_task_timeout) at the session or per query level.

For example:

```
CREATE DATABASE db_test_ddl_single_query_setting
SETTINGS distributed_ddl_task_timeout=0
```

If you manually stop a service, you will need to start it up again in order for queries to be executed.

- **There is currently a soft limit of 5 services per warehouse.** Contact the support team if you need more than 5 services in a single warehouse.
- **Primary services cannot have only one replica** While secondary services can have one replica, the primary service must have at least 2.
- **Primary service idling** Today, the default behavior is that the primary service cannot auto-idling. It is disabled once the secondary service is created. To enable this, contact support to enable parent service idling. Parent service auto-idling will be enabled by default in Q2 2026 (existing services will have access to the feature, new services will have it enabled by default).

## Pricing[​](#pricing "Direct link to Pricing")

Compute prices are the same for all services in a warehouse (primary and secondary). Storage is billed only once - it is included in the first (original) service.

Please refer to the pricing calculator on the [pricing](https://clickhouse.com/pricing) page, which will help estimate the cost based on your workload size and tier selection. The Usage Breakdown table will show you the breakdown of compute costs across services.

## Backups[​](#backups "Direct link to Backups")

- As all services in a single warehouse share the same storage, backups are made only on the primary (initial) service. By this, the data for all services in a warehouse is backed up.
- If you restore a backup from a primary service of a warehouse, it will be restored to a completely new service, not connected to the existing warehouse. You can then add more services to the new service immediately after the restore is finished.

## How to set up a warehouse[​](#setup-warehouses "Direct link to How to set up a warehouse")

### Creating a warehouse[​](#creating-a-warehouse "Direct link to Creating a warehouse")

To create a warehouse, you need to create a second service that will share the data with an existing service. This can be done by clicking the plus sign on any of the existing services:

  

*Fig. 7 - Click the plus sign to create a new service in a warehouse*

On the service creation screen, the original service will be selected in the dropdown as the source for the data of the new service. Once created, these two services will form a warehouse.

### Renaming a warehouse[​](#renaming-a-warehouse "Direct link to Renaming a warehouse")

There are two ways to rename a warehouse:

- You can select "Sort by warehouse" on the services page in the top right corner, and then click the pencil icon near the warehouse name
- You can click the warehouse name on any of the services and rename the warehouse there

### Deleting a warehouse[​](#deleting-a-warehouse "Direct link to Deleting a warehouse")

Deleting a warehouse means deleting all the compute services and the data (tables, views, users, etc.). This action can't be undone.
You can only delete a warehouse by deleting the first service created. To do this:

1. Delete all the services that were created in addition to the service that was created first;
2. Delete the first service (warning: all warehouse's data will be deleted on this step).

- [What is compute-compute separation?](#what-is-compute-compute-separation)- [What is a warehouse?](#what-is-a-warehouse)- [Access controls](#access-controls)
      - [Database credentials](#database-credentials)- [Network access control](#network-access-control)- [Read vs read-write services](#read-vs-read-write)- [Scaling](#scaling)- [Changes in `clusterAllReplicas` behavior](#changes-in-behavior)- [Limitations](#limitations)
            - [Workload isolation limitations](#workload-isolation-limitations)- [Helpful Callouts](#callouts)- [Pricing](#pricing)- [Backups](#backups)- [How to set up a warehouse](#setup-warehouses)
                  - [Creating a warehouse](#creating-a-warehouse)- [Renaming a warehouse](#renaming-a-warehouse)- [Deleting a warehouse](#deleting-a-warehouse)

Was this page helpful?