All Products
Search
Document Center

MaxCompute:Storage resources - Tiered storage

Last Updated:Mar 26, 2026

MaxCompute supports three storage tiers: Standard, Infrequent Access (IA), and Archive. By default, data is stored in the Standard tier. Based on access frequency, move tables or partitions to IA or Archive to reduce storage costs for cold data.

Tiered storage lets you:

  • Cut storage costs for data that is accessed infrequently or retained for compliance

  • Automate tier transitions using lifecycle rules at the project or table level

  • Control access to IA and Archive data using row-level access control to prevent unexpected I/O access fees

Storage tiers

TierDescription
StandardDefault tier. For frequently accessed data that requires regular read and write operations.
Infrequent Access (IA)For data that is not frequently accessed. Storage fees are lower than Standard, but reading data incurs I/O access fees.
ArchiveFor data that is infrequently accessed. Storage and I/O access fees apply for reads.

Choose a storage tier

Select a tier based on how often your data is read:

FactorStandardIAArchive
Access frequencyFrequentNot frequentInfrequent
I/O access feesNoYesYes
Cost breakevenBaseline1x per month = Standard cost1x per 6 months = Standard cost
Hologres direct readsSupportedNot supportedNot supported
Important

If you access IA or Archive data more frequently than the breakeven thresholds above, the combined storage and I/O fees exceed Standard costs. Review access patterns before converting.

Billing

Tiered storage introduces two fee types:

  • Storage fee: Charged for all tiers.

  • I/O access fee: Charged only when reading IA or Archive data. Standard reads are free.

Cost breakeven thresholds:

  • Accessing all data in an IA table or partition once a month costs the same as Standard storage.

  • Accessing all data in an Archive table or partition once every six months costs the same as Standard storage.

To view charges by tier, go to Expenses and Costs > Billing > Bill Details. The billable item names are:

TierBillable item name
StandardStorage
IATiered Storage-IA
ArchiveLong-term Storage

For full pricing details, see Storage fees and View bill details.

Supported regions

China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Chengdu), China (Hong Kong), China East 2 Finance, China North 2 Finance, China South 1 Finance, Singapore, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Japan (Tokyo), Germany (Frankfurt), and US (Silicon Valley).

Limitations

  • Hologres restriction: IA and Archive data cannot be directly accessed by Hologres. When Hologres reads data from MaxCompute, the last_access_time of the affected tables or partitions is not updated. If you configure lifecycle rules based on last_access_time, tables or partitions that are read only by Hologres may still trigger the rule.

Set a storage tier

Changing a storage tier does not affect data access. The following table summarizes supported conversions:

ConversionManualAutomaticI/O access feesTimestamps updated
Standard to IAYesYesNoNo
Standard to ArchiveYesYesNoNo
IA to ArchiveYesYesManual: Yes; Automatic: NoNo
IA to StandardYesNoYesYes
Archive to IAYesNoYesYes
Archive to StandardYesNoYesYes

Set a tier manually

Set the storage tier of a non-partitioned table or a specific partition to IA or Archive. The change takes effect immediately.

For partitioned tables, set the tier on individual partitions, not on the table itself.

Syntax

ALTER TABLE <table_name> [PARTITION(<partition_spec>)]
SET <TBLPROPERTIES|PARTITIONPROPERTIES>("storagetier"="standard|lowfrequency|longterm");

Parameters

ParameterDescription
table_nameRequired. The name of the table or partitioned table.
partition_specRequired when setting the tier for a specific partition.
TBLPROPERTIESModifies the tier of a non-partitioned table.
PARTITIONPROPERTIESModifies the tier of a partition in a partitioned table.
storagetierRequired. The target storage tier. Valid values: standard (Standard, storage fees only), lowfrequency (IA, storage + IA access fees), longterm (Archive, storage + Archive access fees).

Example 1: Set a non-partitioned table to IA

ALTER TABLE tablename
SET TBLPROPERTIES("storagetier"="lowfrequency");

Verify the change with DESC EXTENDED. The StorageTier field shows the current tier:

--View table properties.
DESC extended tablename;

---The following result is returned:
+-------------------------------------------------------------------+
| Owner:                    ALIYUN$mofan_****@test.aliyunid.com      |
| Project:                  mf_mc_****                                |
| TableComment:                                                     |
+-------------------------------------------------------------------+
| CreateTime:               2021-11-18 15:14:00                     |
| LastDDLTime:              2023-09-11 14:34:55                     |
| LastModifiedTime:         2023-09-13 15:02:28                     |
| LastAccessTime:           2023-09-14 10:50:57                     |
+-------------------------------------------------------------------+
| InternalTable: YES      | Size: 1923683131                        |
+-------------------------------------------------------------------+
| Native Columns:                                                   |
+-------------------------------------------------------------------+
| Field| Type| Label |ExtendedLabel| Nullable| DefaultValue|Comment |
+-------------------------------------------------------------------+
| empno    | bigint |       |               | true     | NULL  |    |
| ename    | string |       |               | true     | NULL  |    |
| job      | string |       |               | true     | NULL  |    |
| mgr      | bigint |       |               | true     | NULL  |    |
| hiredate | datetime |     |               | true     | NULL  |    |
| sal      | bigint |       |               | true     | NULL  |    |
| comm     | bigint |       |               | true     | NULL  |    |
| deptno   | bigint |       |               | true     | NULL  |    |
+-------------------------------------------------------------------+
| Extended Info:                                                    |
+-------------------------------------------------------------------+
| TableID:                  8e0cc78c81ab4ad7af30bff7a8e****         |
| IsArchived:               false                                   |
| PhysicalSize:             5771049393                              |
| FileNum:                  3                                       |
| StoredAs:                 AliOrc                                  |
| CompressionStrategy:      normal                                  |
| odps.timemachine.retention.days: 1                                |
| ColdStorageStatus:        N/A                                     |
| encryption_enable:        false                                   |
| StorageTier:              lowfrequency                            |
| StorageTierLastModifiedTime:  2023-09-11 14:34:55                 |
+-------------------------------------------------------------------+

Example 2: Set a partition in the [bank_data_pt](https://www.alibabacloud.com/help/en/maxcompute/getting-started/create-tables-1#section-gwe-8vc-iwx) table to IA

ALTER TABLE bank_data_pt PARTITION (credit='yes') SET PARTITIONPROPERTIES ("storagetier" = 'lowfrequency');

Verify the partition tier:

--View partition properties.
DESC extended bank_data_pt PARTITION(credit='yes');

--The following result is returned:
+------------------------------------------------------------------------------------+
| PartitionSize: 0                                                                   |
+------------------------------------------------------------------------------------+
| CreateTime:               2024-05-10 10:28:16                                      |
| LastDDLTime:              2024-05-10 10:31:01                                      |
| LastModifiedTime:         2024-05-10 10:28:16                                      |
+------------------------------------------------------------------------------------+
| IsExstore:                false                                                    |
| IsArchived:               false                                                    |
| PhysicalSize:             0                                                        |
| FileNum:                  0                                                        |
| ColdStorageStatus:        N/A                                                      |
| StorageTier:              LowFrequency                                             |
| StorageTierLastModifiedTime:  2024-05-10 10:31:01                                  |
+------------------------------------------------------------------------------------+

Set tiers automatically with lifecycle rules

Configure lifecycle rules to automatically convert storage tiers based on how long data has gone unmodified or unaccessed. Rules operate at the project level or partitioned table level.

  • Project-level rules apply to all non-partitioned tables in the project and to partitions in partitioned tables that have no table-level rule defined.

  • Partitioned table-level rules take precedence over project-level rules. When all partitions in a table meet the rule conditions, each matching partition is automatically converted.

Limitations

  • Non-partitioned tables cannot have independent rules — they inherit the project-level rule.

  • Individual partitions cannot have independent rules — they inherit the rule of their parent partitioned table.

Rule execution behavior

  • If a table or partition matches both the Archive (TierToLongterm) and IA (TierToLowFrequency) conditions simultaneously, it is converted to Archive.

  • If a partition first matches the IA condition and later matches the Archive condition, no I/O access fee is charged for the IA-to-Archive automatic conversion.

  • The platform evaluates rules twice a day. Conversions may not happen immediately after conditions are met.

Configure a project-level lifecycle rule

Run the following command:

SETPROJECT odps.table.lifecycle.config=<lifecycle_config_json_string>;

To clear the project-level rule:

SETPROJECT odps.table.lifecycle.config=;

Alternatively, configure the rule in the MaxCompute console:

  1. Log on to the MaxCompute console and select a region.MaxCompute console

  2. In the left navigation pane, choose Manage Configurations > Projects.

  3. Find the target project and click Manage in the Actions column.

  4. On the Project Settings page, click the Parameter Configuration tab.

  5. In the Lifecycle Configuration section, click Edit.

  6. Configure the Last Access Configuration Policy (DaysAfterLastAccessGreaterThan) and Last Modified Configuration Policy (DaysAfterLastModificationGreaterThan) parameters.

Configure a partitioned table lifecycle rule

Set the rule when creating the table:

CREATE [EXTERNAL] TABLE [IF NOT EXISTS] <table_name>
 [PRIMARY KEY (<pk_col_name>, <pk_col_name2>),(<col_name> <data_type> [NOT NULL] [DEFAULT <default_value>] [comment <col_comment>], ...)]
 PARTITIONED BY (<col_name> <data_type> [comment <col_comment>], ...)
tblproperties ('lifecycle_config' = '<lifecycle_config_json_string>');

Modify an existing table's rule:

ALTER TABLE <table_name> SET TBLPROPERTIES ('lifecycle_config' = '<lifecycle_config_json_string>');

View the current rule:

SHOW CREATE TABLE <table_name>;

Clear a table's lifecycle rule:

ALTER TABLE <table_name> SET TBLPROPERTIES ('lifecycle_config'='{}');

Lifecycle rule parameters

The lifecycle_config_json_string value uses the following structure.

For project-level rules:

{
  "TierToLowFrequency": {
    "DaysAfterLastModificationGreaterThan": <days>,
    "DaysAfterLastAccessGreaterThan": <days>
  },
  "TierToLongterm": {
    "DaysAfterLastModificationGreaterThan": <days>,
    "DaysAfterLastAccessGreaterThan": <days>
  }
}

For partitioned table rules (escape double quotes in the property value):

{
  \"TierToLowFrequency\": {
    \"DaysAfterLastModificationGreaterThan\": <days>,
    \"DaysAfterLastAccessGreaterThan\": <days>
  },
  \"TierToLongterm\": {
    \"DaysAfterLastModificationGreaterThan\": <days>,
    \"DaysAfterLastAccessGreaterThan\": <days>
  }
}
ParameterDescription
TierToLowFrequencyTrigger condition for automatic conversion to IA.
TierToLongtermTrigger condition for automatic conversion to Archive.
DaysAfterLastModificationGreaterThanDays since the last data modification (LastModifiedTime) before conversion triggers.
DaysAfterLastAccessGreaterThanDays since the last data access (LastAccessTime) before conversion triggers. If LastAccessTime is empty: for tables or partitions created before October 1, 2023, the calculation starts from 2023-10-01 00:00:00 UTC+0; for those created on or after October 1, 2023, the calculation starts from CreateTime.

Each condition is optional. When multiple conditions are specified, they have an OR relationship — any matched condition triggers the conversion.

For all available parameters, see General parameters.

Examples

Example 1: Set a project-level lifecycle rule

Automatically move data to IA after 120 days without access, and to Archive after 180 days without access:

setproject odps.table.lifecycle.config={"TierToLongterm":{"DaysAfterLastAccessGreaterThan":180},"TierToLowFrequency":{"DaysAfterLastAccessGreaterThan":120}};

Example 2: Set a lifecycle rule for a partitioned table

--Set the rule when creating a partitioned table.
CREATE TABLE lifecycle_part_t (key string)
PARTITIONED BY (ds STRING)
tblproperties ('lifecycle_config' = '{\"TierToLowFrequency\": {\"DaysAfterLastModificationGreaterThan\": 2,\"DaysAfterLastAccessGreaterThan\": 2},\"TierToLongterm\": {\"DaysAfterLastModificationGreaterThan\": 4,\"DaysAfterLastAccessGreaterThan\": 7}}');

--Modify the rule for an existing partitioned table.
ALTER TABLE lifecycle_part_t SET tblproperties ('lifecycle_config'='{\"TierToLowFrequency\": {\"DaysAfterLastModificationGreaterThan\": 90,\"DaysAfterLastAccessGreaterThan\": 30},\"TierToLongterm\": {\"DaysAfterLastModificationGreaterThan\": 180,\"DaysAfterLastAccessGreaterThan\": 7}}');

Configure access permissions for tiered storage data

Accessing IA or Archive data incurs I/O access fees. Use the GET_PARTITION_META function with row-level access control to restrict which users can read data in each storage tier, preventing unexpected fees.

GET_PARTITION_META

GET_PARTITION_META only works within row-level access control policies. It cannot be used in regular SQL queries.

Syntax

struct GET_PARTITION_META(<tableName>, <pt_col1>, <pt_col2>, ..., <pt_col_n>);

Parameters

ParameterDescription
tableNameThe name of a partitioned table. String type. Accepted formats: project.table or project.schema.table.
pt_col1 to pt_col_nColumn references corresponding to each partition level of the partitioned table.

Return value

Returns a Struct value of the type struct<storagetier:string>. The struct contains a single String field that describes the storage tier of the corresponding partition.

Usage notes

  • When adding a row-level policy to a table, set explicit rules for all existing users to avoid unexpected access denial. For details, see Row-level access control.

  • GET_PARTITION_META is only supported by the MaxCompute SQL engine. Tables using this function in row-level policies cannot be read by external engines such as Spark or Flink.

  • To read data, users still need the SELECT permission on the table in addition to satisfying the row-level policy.

Partition pruning behavior

How the filter condition is written affects whether the query triggers a full table scan:

Filter conditionPartition pruning behavior
Partition fields only (e.g., storagetier == 'standard' AND pt1='2024')Partition pruning applies — only matching partitions are scanned.
Partition field AND a non-partition field (e.g., storagetier == 'standard' AND a > 100)Partition pruning still applies — only partitions in the standard tier are scanned.
Partition field OR a non-partition field (e.g., storagetier == 'standard' OR a > 100)No WHERE clause: all partitions are scanned for a > 100. With a WHERE clause: only data in the matching partition is scanned.

Examples

The following examples use the table storage_table:

CREATE TABLE storage_table(a BIGINT, b BIGINT) PARTITIONED BY (pt1 STRING, pt2 STRING);

Example 1: Restrict all users to Standard data only

Grant the policy01 permission to the default user, allowing access only to Standard storage data. IA and Archive data returns null for all users, including the project owner.

CREATE ROW ACCESS POLICY policy01
ON storage_table
TO DEFAULT
FILTER USING (get_partition_meta('storage_table', pt1, pt2).storagetier == 'standard');

If the following keywords appear in the Summary section of Logview, row-level filtering is triggered.

image

Example 2: Allow a specific user to access IA and Archive data

Grant the policy02 permission to user_x, allowing access to IA and Archive data.

CREATE ROW ACCESS POLICY policy02
ON storage_table
TO USER (user_x)  --You can also grant permissions to a role using TO role rolename and then grant the role to the user.
FILTER USING (get_partition_meta('storage_table', pt1, pt2).storagetier IN ('lowfrequency','longterm'));

With both policy01 and policy02 in effect:

  • All users except user_x can access Standard data but get null for IA and Archive data.

  • user_x can access IA and Archive data but gets null for Standard data.

Without policy01:

  • All users except user_x get null for all data in storage_table.

  • user_x can access IA and Archive data but gets null for Standard data.

Example 3: Grant a user access to all storage tiers

Grant the policy03 permission to user_y, allowing access to all data regardless of storage tier.

CREATE ROW ACCESS POLICY policy03
ON storage_table
TO USER (user_y)  -- You can also grant permissions to a role using the TO role rolename clause and then grant the role to the user.
FILTER USING (true);  -- The constant true indicates that all data in the table can be accessed

With policy01 in effect:

  • All users except user_y can access Standard data, but get null for IA and Archive data.

  • user_y can access data in all storage tiers.

Without policy01:

  • All users except user_y get null for all data in storage_table.

  • user_y can access data in all storage tiers.