All Products
Search
Document Center

MaxCompute:MaxCompute SQL limits

Last Updated:Mar 26, 2026

MaxCompute SQL enforces hard limits on naming, data volume, and statement complexity to maintain system stability at scale. This topic lists all limits, grouped by category.

Some of the preceding limits cannot be manually modified.

Naming limits

ItemLimitAdjustableBehavior when exceededDescription
Table or column name length128 bytesNoNames can contain only letters, digits, and underscores (_). Names must start with a letter. Special characters are not supported.
Comment length1,024 bytesNoA comment must be a valid string and cannot exceed 1,024 bytes.

Quantity limits

ItemLimitAdjustableBehavior when exceededDescription
Column definitions per table1,200NoA table can contain a maximum of 1,200 column definitions.
Partitions per table60,000NoA table can contain a maximum of 60,000 partitions.
Partition levels per table6NoA table supports a maximum of six partition levels.
SELECT output rows10,000 rowsNoA SELECT statement returns a maximum of 10,000 rows.
Destination tables for MULTI-INSERT256NoA MULTI-INSERT statement can write to a maximum of 256 tables in one operation.
Tables combined by UNION ALL256NoA UNION ALL statement can combine a maximum of 256 tables.
Small tables in a MAPJOIN128NoA MAPJOIN hint allows you to join a maximum of 128 small tables.
Memory for MAPJOIN small tables512 MBNoThe total memory for all small tables in a MAPJOIN cannot exceed 512 MB.
Rows from ptinsubq (partition in subquery)1,000 rowsNoA PT IN SUBQUERY statement can generate a maximum of 1,000 rows.
Partitions that can be queried10,000NoA maximum of 10,000 partitions can be queried.
Parameters in an IN clause1,024 (recommended)Compilation performance degradesMore than 1,024 parameters in an IN clause — for example, IN (1, 2, 3, ..., 1024) — degrade compilation performance. This is a guideline, not a hard limit.

Size limits

ItemLimitAdjustableBehavior when exceededDescription
SQL statement length2 MBNoAn SQL statement cannot exceed 2 MB. This applies when running statements through the SDK.
Column record length8 MBNoA column record in a table cannot exceed 8 MB.
jobconf.json file size1 MBNoThe jobconf.json file cannot exceed 1 MB. Tables with many partitions are more likely to hit this limit.
SQL execution plan size1 MBNoJob fails with FAILED: ODPS-0010000:System internal error - The Size of Plan is too largeAn execution plan generated by MaxCompute SQL cannot exceed 1 MB.

Execution limits

ItemLimitAdjustableBehavior when exceededDescription
Maximum job execution duration72 hoursNoJob is stopped automaticallyThe default maximum duration for a single SQL job is 24 hours. You can extend this up to 72 hours using the parameter below. A job that reaches 72 hours is stopped automatically.

To extend the job timeout up to 72 hours, run:

set odps.sql.job.max.time.hours=72;

Frequency limits

ItemLimitAdjustableBehavior when exceededDescription
Partition creation rate120 times per 15 secondsNoThe ALTER TABLE <table_name> ADD PARTITION <pt_spec> operation is limited to 120 executions per 15 seconds.

Operation limits

ItemLimitAdjustableBehavior when exceededDescription
View writabilityNot writableNoViews do not support INSERT statements.
Column data type and positionUnmodifiableNoThe data type and position of an existing column cannot be changed.
Java user-defined functions (UDFs)Cannot be abstract or staticNoJava UDFs must be non-abstract and non-static.