ByteHouse cloud data warehouse edition provides the virtual warehouse local disk function, which serves as a temporary storage area during data writes and as a cache area during data reads. This document provides guidance on using the virtual warehouse local disk function.
In user search scenarios (such as logs and others), insufficient local cache often leads to severe performance degradation, or even results cannot be found. To avoid this problem, ByteHouse supports adding local storage to the virtual warehouse and scaling the local storage when scaling the virtual warehouse.
The virtual warehouse local disk is a value-added paid service. For billing information, see Specifications and pricing.
Users can select the "local disk" function when creating a virtual warehouse. For detailed instructions, see Create or edit virtual warehouse.
danger
After enabling the local disk feature, if you later need to scale down the virtual warehouse, the system will simultaneously clear the existing cache. Please proceed with caution.
Users can also go to the virtual warehouse management page, scroll the horizontal bar of the virtual warehouse page to the left, find the Local disk column, click the Go to enable button in the Local disk column (or directly click the edit button in the actions column edit), and configure the local disk function.
After activating the virtual warehouse local disk, you can configure cache loading Mission to pre-load data into cache resources and improve subsequent search speed. For guidance on creating cache loading Mission, see Cache preload.
You can adjust the virtual warehouse local disk TTL at the table level by modifying the table setting Param. The following is an example. When using, please use the actual database and table names, and refer to the parameter description below to replace the setting Param value with the actual parameter value:
ALTER TABLE demo_db.demo_table MODIFY SETTING partition_time_key = 'toDate(time)', local_disk_cache_partition_ttl = '7d';
The setting Param description is as follows:
Setting parameter items | Type | Configuration description |
|---|---|---|
partition_time_key | String | Used to specify the time field expression relied upon for table TTL filtering. It must be set to the time field among the table's partition fields that represents time.
|
local_disk_cache_partition_ttl | String | Table TTL value. Supports settings as |
After creating the virtual warehouse local disk, you can view the monitoring metrics of the local disk on the Tenant management > Cloud monitor page.
For details on the currently supported local disk monitoring metrics and instructions for creating monitoring alarms in BytePlus Cloud Monitor, see Alarm.