This topic describes the limits of MaxCompute SQL statements.

Item Maximum value/Limit Category Description
Table name length 128 bytes Length A table or column name can contain only letters, digits, and underscores (_). It must start with a letter. Special characters are not supported.
Comment length 1,024 bytes Length A comment is a valid string that cannot exceed 1,024 bytes in length.
Column definitions in a table 1,200 Quantity A table can contain a maximum of 1,200 column definitions.
Partitions in a table 60,000 Quantity A table can contain a maximum of 60,000 partitions.
Partition levels of a table 6 Quantity A table can contain a maximum of six levels of partitions.
Output display 10,000 rows Quantity A SELECT statement can return a maximum of 10,000 rows.
Number of destination tables for INSERT operations 256 Quantity The MULTI-INSERT statement allows you to insert data into a maximum of 256 tables at the same time.
UNION ALL 256 Quantity The UNION ALL statement allows you to combine a maximum of 256 tables.
MAPJOIN 128 Quantity A MAPJOIN hint allows you to join a maximum of 128 small tables.
MAPJOIN memory 512 MB Size The memory size for all small tables cannot exceed 512 MB when you specify a MAPJOIN hint in SQL statements.
ptinsubq 1,000 rows Quantity A PT IN SUBQUERY statement can generate a maximum of 1,000 rows.
Length of an SQL statement 2 MB Length An SQL statement cannot exceed 2 MB in length. This limit is suitable for the scenarios in which you use an SDK to call SQL statements.
Conditions of a WHERE clause 256 Quantity A WHERE clause can contain a maximum of 256 conditions.
Length of a column record 8 MB Length The maximum length of a column record in a table is 8 MB.
Parameters in an IN clause 1,024 Quantity This item specifies the maximum number of parameters in an IN clause, such as IN (1,2,3….,1024). If the number of parameters in an IN clause is too large, the compilation performance is affected. We recommend that you use a maximum of 1,024 parameters, but this is not a fixed upper limit.
jobconf.json 1 MB Size The maximum size of the jobconf.json file is 1 MB. If a table contains a large number of partitions, the size of the jobconf.json file may exceed 1 MB.
View Not writable Operation A view is not writable and does not support the INSERT statements.
Data type and position of a column Unmodifiable Operation The data type and position of a column cannot be modified.
Java user-defined functions (UDFs) Not allowed to be abstract or static Operation Java UDFs cannot be abstract or static.
Partitions that can be queried 10,000 Quantity A maximum of 10,000 partitions can be queried.
SQL execution plans 1 MB Size The size of an execution plan that is generated by using MaxCompute SQL statements cannot exceed 1 MB. Otherwise, the error message FAILED: ODPS-0010000:System internal error - The Size of Plan is too large is reported.
Note The preceding limits cannot be manually modified.