Enable tiered storage in Aiven for ClickHouse®
Enable the tiered storage feature on a table in your Aiven for ClickHouse® service.
Before you enable tiered storage, review the limitations.
Prerequisites
- You have at least one Aiven for ClickHouse service.
- Depending on how to activate tiered storage, you need:
- Aiven Console or
- SQL and an SQL client (for example, the ClickHouse client).
- All maintenance updates are applied on your service (check in the Aiven Console: your service's Overview > Service settings > Service management > Maintenance updates).
Activate tiered storage on a table
You can enable tiered storage both on new tables and on existing ones. For that purpose, you can use either CLI or the Aiven Console.
- Console
- CLI
- Log in to the Aiven Console, and go to your organization, project, and service.
- On the Overview of your service, select Databases and tables from the sidebar.
- In the Databases and tables view, find a table on which to activate tiered storage, and click Actions > Activate tiered storage > Activate.
-
Connect to your Aiven for ClickHouse service using, for example, the ClickHouse client.
-
To activate the tiered storage feature on a specific table, set
storage_policytotieredon this table by executing the following SQL statement:ALTER TABLE database-name.table-name MODIFY SETTING storage_policy = 'tiered'
Tiered storage is activated on your table and data in this table is now distributed between two tiers: Network-attached block storage and object storage.
You can check if tiered storage is now supported (Active/Not active) on your table in the Aiven Console > your service's page > Databases and tables > Your database > Your table > Tiered storage column.
What's next
- Configure data retention thresholds for tiered storage
- Check data volume distribution between different disks
Related pages