Skip to content
Enable tiered storage in Managed ClickHouse®

Enable tiered storage in Managed ClickHouse®

Enable the tiered storage feature on a table in your Managed ClickHouse® service.

Before you enable tiered storage, review the limitations.

Prerequisites

  • You have at least one Managed ClickHouse service.
  • SQL and an SQL client (for example, the ClickHouse client).
  • All maintenance updates are applied on your service. Check the pending list with exo x get-dbaas-service-clickhouse my-clickhouse -z ch-gva-2 -q 'maintenance' and apply it with exo x start-dbaas-clickhouse-maintenance my-clickhouse -z ch-gva-2.

Activate tiered storage on a table

You can enable tiered storage both on new tables and on existing ones.

  1. Connect to your Managed ClickHouse service using, for example, the ClickHouse client.

  2. To activate the tiered storage feature on a specific table, set storage_policy to tiered on this table by executing the following SQL statement:

    ALTER TABLE database_name.table_name MODIFY SETTING storage_policy = 'tiered'

    Note

    A hyphen is not valid in an unquoted ClickHouse identifier: the parser reads it as a subtraction and the statement fails with a syntax error. Quote names that contain one with backticks, as in ALTER TABLE `my-db`.`my-table` .

Tiered storage is activated on your table. From now on, data in this table is distributed between two tiers: Network-attached block storage and object storage.

What’s next

Last updated on