All Products
Search
Document Center

PolarDB:Cold data archiving

Last Updated:Nov 06, 2025

Cold data is data that is rarely updated or accessed. You can use the cold data archiving feature to transfer this data to the low-cost Object Storage Service (OSS) to reduce your data storage costs.

How it works

PolarDB for MySQL supports archiving data in CSV or ORC format.

image

You can archive data manually or automatically. The archived data is converted to CSV or ORC format and stored as multiple files in OSS. This data is then automatically deleted from the PolarDB storage space, which reduces your storage fees. Nodes can then access the data in OSS over the Alibaba Cloud internal network. See Manually archive cold data and Automatically archive cold data.

Note

The partitioned table archiving feature is currently in canary release. To use this feature, go to the Quota Center, find the quota by its Quota ID polardb_mysql_hybrid_partition, and click Apply in the Actions column.

Format comparison

Use the following comparison to select an appropriate format for archiving cold data.

Note
  • Limitations apply when you archive standard tables, OSS external tables, and partitioned tables. Review these limitations carefully before you archive data to avoid impacting your business.

  • After cold data is archived, it is stored in a default system-provided Object Storage Service (OSS) bucket, not in your own OSS bucket. You can view the list of archived data only in the PolarDB console.

  • Partitioned table archiving methods:

    • Archive a partition: This method archives a partition of a table in place. The data remains in the original table, but the storage medium for that partition changes from PolarDB (hot storage) to OSS (cold storage). The table becomes a hybrid partitioned table containing both hot and cold partitions.

    • Archive a partition to an OSS external table: This method moves the data from a partition to a new, separate OSS external table. The original partition is then deleted from the source table.

Comparison item

CSV

ORC

Open-source format

Yes

Yes

Archiving method

Manual archiving:

Archiving speed

Fast

Note

Only single-threaded archiving is supported.

Slow

Note

Only single-threaded archiving is supported.

Query speed

  • Slow. Without an index and using a sequential query, the query performance is about one-fifth to one-tenth that of the InnoDB storage engine.

  • Faster than ORC format on row store nodes.

Note

Both single-threaded and multi-threaded data reads are supported.

  • Poor. Without an index and using a sequential query, the query performance is about one-fifth to one-tenth that of the InnoDB storage engine.

  • Suitable for AP queries on a separate column store node.

Note

Only single-threaded data reads are supported.

Transaction support

No

No

Indexing capability

No

No

How to modify archived data

Archived tables in OSS are read-only. To modify the data, you must import it back to the PolarDB storage space.

Storage space usage

Same as the storage space used by a table in the InnoDB engine without an index.

For the same amount of data, ORC format uses 45% of the storage space required by CSV format.

Backup and recovery

Not supported.

Note

The backup operation does not back up archived cold data in OSS. Therefore, you cannot use backups to recover databases or tables, restore from backups, or perform a point-in-time recovery.

Impact after archiving

Scope

  • Archiving to CSV format

    • For Cluster Edition clusters, one of the following kernel versions is required:

      • MySQL 8.0.1 revision 8.0.1.1.47 or later.

      • MySQL 8.0.2 revision 8.0.2.2.10 or later.

    • For Multi-master Cluster (Limitless) Edition clusters, kernel version 8.0.1.0.13 or later is required.

  • Archiving to ORC format

    • For Cluster Edition clusters, revision version 8.0.2.2.30 or later is required.

    • For Multi-master Cluster (Limitless) Edition clusters, revision version 8.0.2.2.30 or later is required.

Billing

Cold data is billed based on the storage capacity used in OSS. You can purchase a PolarDB storage plan to offset the storage costs of cold data in OSS. For more information, see Storage plans.

Regions in the Chinese mainland

China (Hong Kong) and regions outside China

USD 0.0000325 per GB-hour

USD 0.0000455 per GB-hour

Example: You enable and perform cold data archiving for a cluster deployed in the Chinese mainland. The amount of cold data archived in OSS is 100 GB. The hourly cold data storage fee is 100 GB × USD 0.0000325 per GB-hour = USD 0.00325 per hour.

Note

For information about how to view the amount of archived cold data, see View information about the cold data archived in OSS.

How to use

For more information, see Usage instructions.