All Products
Search
Document Center

MaxCompute:SQL limitations

Last Updated:Mar 28, 2026

MaxCompute SQL is designed to process large-scale datasets. To ensure system stability and operational efficiency, MaxCompute SQL has certain limitations. This topic describes the limitations of MaxCompute SQL.

Item

Limit

Category

Description

Table name length

128 bytes

Length limit

A table name cannot contain special characters, must start with a letter, and can only contain letters (a-z, A-Z), digits, and underscores (_).

Column name length

128 bytes

Length limit

  • Column names are case-insensitive, cannot contain special characters, and can include only letters (a-z, A-Z), digits, underscores (_), or Chinese characters. We recommend starting column names with a letter. Column names cannot exceed 128 bytes.

  • If you enable BigQuery compatible mode with the SET odps.sql.bigquery.compatible=true; command, the maximum column name length increases to 256 bytes.

Comment length

1,024 bytes

Length limit

A comment must be a valid string that does not exceed 1,024 bytes.

Columns per table

1,200

Quantity limit

A table supports a maximum of 1,200 columns.

Partitions per table

60,000

Quantity limit

A table supports a maximum of 60,000 partitions.

Partition levels per table

6

Quantity limit

A table supports a maximum of six partition levels.

Screen display

10,000 rows

Quantity limit

A SELECT statement can display a maximum of 10,000 rows on the screen.

Destination tables forINSERT

256

Quantity limit

A MULTI-INSERT statement can write to a maximum of 256 destination tables.

UNION ALL

256

Quantity limit

AUNION ALL statement can combine a maximum of 256 tables.

MAPJOIN

128

Quantity limit

In aMAPJOIN operation, you can join a maximum of 128 small tables.

MAPJOIN memory limit

512 MB

Quantity limit

In aMAPJOIN operation, all small tables combined cannot exceed 512 MB of memory.

ptinsubq (partition in subquery)

1,000 rows

Quantity limit

If a subquery contains a partition column, the subquery can return a maximum of 1,000 rows.

SQL statement length

2 MB

Length limit

A SQL statement cannot exceed 2 MB. This limit also applies to SQL statements run through an SDK.

Cell size

8 MB

Quantity limit

The data in a single table cell cannot exceed 8 MB.

Number of parameters in an IN clause

1,024

Quantity limit

The recommended maximum number of parameters in anIN clause is 1,024, such as in (1,2,3...,1024). An in(…) clause with too many parameters can degrade compilation performance. The value 1,024 is a recommendation, not a strict limit.

jobconf.json size

1 MB

Length limit

The size of jobconf.json is 1 MB. When a table contains a large number of partitions, the size may exceed jobconf.json, exceeding 1 MB.

Views

Not writable

Operation limit

Views are read-only and do not supportINSERT operations.

Column data type

Cannot be modified

Operation limit

You cannot modify the data type or position of an existing column.

Java user-defined function (UDF)

Cannot beABSTRACT orSTATIC.

Operation limit

A Java UDF cannot be defined asABSTRACT orSTATIC.

Maximum number of partitions to query

10,000

Quantity limit

A query can scan a maximum of 10,000 partitions.

SQL execution plan size

1 MB

Length limit

The execution plan generated by MaxCompute SQL cannot exceed 1 MB. If it does, the job fails and returns the following error:FAILED: ODPS-0010000:System internal error - The Size of Plan is too large.

Maximum job execution duration

72 hours

Runtime duration limit

By default, the maximum execution duration for a single SQL job is 24 hours. You can extend this limit to 72 hours by using the following command. The system automatically terminates any job that runs longer than 72 hours.

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

Partition creation frequency

120 times/15 seconds

Frequency limit

You can execute the ALTER TABLE <table_name> ADD PARTITION <pt_spec> operation a maximum of 120 times every 15 seconds.

Note

Some of these MaxCompute SQL limitations cannot be changed.