Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Configuring a Cold Table

Updated on 2025-02-12 GMT+08:00

This section describes how to configure a cold table.

You can configure a cold table in either of the following ways:

  • On the console: You can create and migrate back a cold table on the console.
  • Using SQL statements: You can create, query, and migrate back a cold table using SQL statements. If there are more than 100,000 tables in your DB instance, you can create and migrate back a cold table only using SQL statements.

Constraints

Configuring a Cold Table on the Console

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page, choose Databases > TaurusDB.
  4. On the Instances page, click the instance name.
  5. In the navigation pane, click Cold and Hot Data Separation.
  6. Click on the right of Cold and Hot Data Separation. In the displayed dialog box, click OK.

    Figure 1 Enabling cold and hot data separation

  7. Click Create Cold Table.

    Figure 2 Creating a cold table

  8. In the displayed dialog box, search for the name of the database, table, or partition to be archived as cold data.
  9. Select the tables or partitions to be archived as cold data.

    Figure 3 Selecting the tables to be archived
    NOTE:
    • Cold tables can only be queried using SELECT statements and the query speed is slow. Do not configure tables storing frequently updated data as cold tables.
    • Hot and cold data separation cannot be enabled for instances with TDE or cross-region backup enabled.
    • Only the structure of a cold table can be backed up. Cold data cannot be backed up or restored.
    • During migration using DRS, if you want to retain cold table data of a source database, migrate cold tables back to the source database and then migrate the database using DRS. Otherwise, the cold tables will be migrated to empty tables of the destination database.
    • To prevent a creation failure, do not run DDL or DML statements on the selected table.

  10. Click OK.
  11. After the cold table is created, view its details.

    Figure 4 Viewing details about a cold table

  12. If you need to modify a cold table or frequently query the table, click Migrate Back in the Operation column to migrate the table back to the DB instance.

    NOTE:

    You are advised to migrate back cold tables during off-peak hours because this operation can take a long time.

    Figure 5 Migrating back a cold table

    Confirm the task and click OK.

Configuring a Cold Table Using SQL Statements

When configuring a cold table using SQL statements, you need to use DAS or a client (such as the mysql client) to connect to your TaurusDB instance and then run the corresponding SQL statements. The following procedure uses DAS as an example.

  1. On the Instances page, locate an instance and click Log In in the Operation column.

    Figure 6 Logging in to an instance

  2. On the displayed page, enter the correct username and password and click Test Connection. After the connection is successful, click Log In.

    Figure 7 Login page

  3. Choose SQL Operations > SQL Query.

    Figure 8 SQL Operations

  4. Configure a cold table using SQL statements.

    • Creating a cold table

      CALL dbms_schs.make_io_transfer("start", "database_name", "table_name", "partition_name", "", "obs");

      Example:

      CALL dbms_schs.make_io_transfer("start", "test", "table1", "", "", "obs");

      Figure 9 Creating a cold table
    • Querying data from a cold table

      select * from table_name;

      Example:

      select * from table1;

      Figure 10 Querying data from a cold table
    • Querying the archiving or migration status

      CALL dbms_schs.show_io_transfer("database_name", "table_name", "partition_name");

      Example:

      CALL dbms_schs.show_io_transfer("test", "table1", "");

      Figure 11 Querying the archiving or migration status
    • Migrating back a cold table

      CALL dbms_schs.make_io_transfer("start", "database_name", "table_name", "partition_name", "obs", "");

      Example:

      CALL dbms_schs.make_io_transfer("start", "test", "table1", "", "obs", "");

      Figure 12 Migrating back a cold table
    • Querying all cold tables on an instance as user root

      CALL sys.schs_show_all( "database_name", "table_name", "partition_name");

      Examples:

      1. Querying all cold tables on an instance

        CALL sys.schs_show_all( "", "", "");

      2. Querying all cold partitions or cold tables whose database name is test

        CALL sys.schs_show_all( "test", "", "");

      3. Querying cold partitions or cold tables whose database name is test and table name is table1

        CALL sys.schs_show_all( "test", "table1", "");

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback