STORAGE_TIER.-- Create the entire table as a cold table.CREATE TABLE archive_log (id BIGINT PRIMARY KEY,log_time DATETIME,payload TEXT) STORAGE_TIER = OBJECT_STORAGE;-- Explicitly declare the use of local storage (equivalent to not specifying it).CREATE TABLE hot_order (id BIGINT PRIMARY KEY,amount DECIMAL(10,2)) STORAGE_TIER = LOCAL_STORAGE;
STORAGE_TIER are as follows:Value | Description |
AUTO | Selected by the system according to the default policy, and currently equivalent to LOCAL_STORAGE. |
LOCAL_STORAGE | Data is stored in the hot data storage layer (DataDB) using local storage. |
OBJECT_STORAGE | Data is stored in the cold data storage layer (CacheDB + DurableDB) using COS. |
CREATE TABLE order_history (id BIGINT,order_date DATE,amount DECIMAL(10,2),PRIMARY KEY (id, order_date))PARTITION BY RANGE COLUMNS (order_date) (PARTITION p_2023 VALUES LESS THAN ('2024-01-01') STORAGE_TIER = OBJECT_STORAGE,PARTITION p_2024 VALUES LESS THAN ('2025-01-01') STORAGE_TIER = OBJECT_STORAGE,PARTITION p_2025 VALUES LESS THAN ('2026-01-01') STORAGE_TIER = LOCAL_STORAGE);
ALTER TABLE.ALTER TABLE archive_log STORAGE_TIER = OBJECT_STORAGE;
ALTER TABLE ... MODIFY PARTITION.ALTER TABLE order_historyMODIFY PARTITION (p_2024) STORAGE_TIER = OBJECT_STORAGE;
Column Name | Description |
Database name | Name of the database to which the archive object belongs. |
Table name | Name of the table to which the archive object belongs. |
Partition name | Name of the partition to which the archive object belongs. It displays as - during full-table archiving. |
Data size | Data volume of the archive object. |
Status | Archiving status. pending indicates waiting for archiving, and archived indicates that archiving is completed. |

information_schema.TDSTORE_TIERING_COLD_RG_JOB_PROGRESS view for real-time monitoring of the cold migration task progress for each data shard.SELECTnode_name,rep_group_id,stage,uploaded_file_num,total_file_num,progress_pct,elapsed_time_ms,err_msgFROM information_schema.TDSTORE_TIERING_COLD_RG_JOB_PROGRESSORDER BY rep_group_id;
stage is Done and err_msg is empty, it indicates that the cold migration for this shard has succeeded.information_schema.TDSTORE_TIERED_STORAGE_USAGE view, which facilitates the evaluation of the cooling effect.-- View the approximate data volume for each cold table index/partitionSELECTTABLE_SCHEMA,TABLE_NAME,PARTITION_NAME,INDEX_NAME,CACHE_DB_SIZE,DURABLE_DB_SIZE,TOTAL_SIZEFROM information_schema.TDSTORE_TIERED_STORAGE_USAGE;-- Aggregate by tableSELECTTABLE_SCHEMA,TABLE_NAME,SUM(CACHE_DB_SIZE) AS cache_total,SUM(DURABLE_DB_SIZE) AS durable_totalFROM information_schema.TDSTORE_TIERED_STORAGE_USAGEGROUP BY TABLE_SCHEMA, TABLE_NAME;
tdstore_tiered_storage_usage_view_mode. The default value 1 uses the low-I/O aggregation mode. When set to 2, it returns real-time data with higher overhead. When set to 0, the view is disabled.フィードバック