This topic provides answers to some commonly asked questions about the cold data archiving feature.
How do I schedule cold data archiving tasks?
Cold data archiving tasks consume huge CPU and I/O resources on the compute node. Therefore, unfinished cold data archiving tasks are suspended beyond the maintenance window to ensure the normal running of the instance. Unfinished cold data archiving tasks are suspended when the maintenance window ends and resumed when the maintenance window starts on the next day.
What is the maintenance window for cold data archiving? How do I modify the maintenance window for cold data archiving?
The default maintenance window for cold data archiving is 02:00 to 05:00. You can execute the following statement to set the maintenance window accurate to the minute:
-- Set the start time of the maintenance window:
SET GLOBAL MAINTENANCE_TIME_START='HH:MM';
-- Set the end time of the maintenance window:
SET GLOBAL MAINTENANCE_TIME_END='HH:MM';
-- Check whether the settings take effect:
SET SHOW_ALL_PARAMS=true;
SHOW GLOBAL VARIABLES LIKE '%MAINTENANCE_TIME%';Important Instances of PolarDB-X 5.4.16-16773973 and later allow the maintenance window to extend beyond 00:00. Instances of earlier versions require the maintenance window within the same day.
How are backups of archived tables billed?
PolarDB-X allows you to back up of archived tables. You are not charged for backups of archived tables.
What are the common O&M instructions for cold data archiving?
The following table describes the common O&M instructions for cold data archiving.
| Statement or view | Description |
clear oss cache |
|
set global OSS_BACKFILL_SPEED_LIMITATION=XX | The speed at which data is archived to OSS. Valid values: 100000 to 300000. Unit: rows/s. |
show filestorage | Displays the OSS URI, read speed limit, write speed limit, read traffic, and write traffic. The settings are updated every 5 seconds. |
show cache_stats | Displays the cache information, including the cached file path, number of files, cache space, retention days, and hit and miss statistics. |
show archive | Displays the TTL association information of a database, including TTL tables and archived tables. |
show files from {table_name} | Displays information of all files in the archived table (excluding format files and index files), including topology, number of rows in the file, file storage space, creation time, and TSO time. |
| information_schema.files | Displays information of all types of files in the archive table, including the following files:
Example: select logical_table_name, file_name, file_type, extent_size, table_rows, create_time from information_schema.files where logical_table_name = {table_name}; |
| information_schema.file_storage | Displays the file data source information, including the read lock and write lock. Example: select URI, ENGINE, ROLE, READ_LOCK_COUNT, WRITE_LOCK_COUNT from information_schema.file_storage where ENGINE = 'OSS'; |
| information_schema.archive | Displays the archiving information of each pair of TTL and archived tables, including the following information:
Example: select ARCHIVE_TABLE_NAME, LOCAL_PARTITION_TABLE_NAME, SCHEDULE_STATUS, LAST_FIRE_TIME, LAST_SUCCESS_ARCHIVE_TIME, ARCHIVE_STATUS from information_schema.archive where ARCHIVE_TABLE_NAME = {table_name}; |