This topic describes all the limits of MaxCompute SQL statements.

Item Maximum value/Limit Category Description
Table name length 128 bytes Length limit A table or column name cannot contain special characters. It must start with a letter, and can contain only letters, digits, and underscores (_).
Comment length 1,024 bytes Length limit A comment is a valid string that can be up to 1,024 bytes in length.
Columns in a table 1,200 Quantity limit A table can contain a maximum of 1,200 columns.
Partitions in a table 60,000 Quantity limit A table can contain a maximum of 60,000 partitions.
Partition levels of a table 6 Quantity limit A table can contain a maximum of six levels of partitions.
Screen display 10,000 rows Quantity limit A SELECT statement can return a maximum of 10,000 rows.
INSERT targets 256 Quantity limit A MULTI-INSERT operation can insert data to up to 256 tables at a time.
UNION ALL targets 256 Quantity limit A UNION ALL operation can merge up to 256 tables at a time.
MAPJOIN targets 128 Quantity limit A MAPJOIN operation can join up to 128 small tables at a time.
MAPJOIN memory 512 MB Size limit The memory size for all small tables on which the MAPJOIN operation is performed cannot exceed 512 MB.
Window functions 5 Quantity limit A SELECT statement can contain a maximum of five window functions.
ptinsubq 1,000 rows Quantity limit If a subquery contains a partition column, the subquery can return no more than 1,000 rows.
Length of an SQL statement 2 MB Length limit The maximum length of an SQL statement is 2 MB. This limit is suitable for the scenarios where you use the SDK to call SQL statements.
Conditions of a WHERE clause 256 Quantity limit A WHERE clause can contain a maximum of 256 conditions.
Length of a column record 8 MB Length limit The maximum length of a column record in a table is 8 MB.
Parameters in an IN clause 1024 Quantity limit This item specifies the maximum number of parameters in an IN clause, for example, in (1,2,3….,1024). If an in (…) clause contains excessive parameters, the compilation performance will be affected. We recommend that you use no more than 1,024 parameters, but this is not a fixed upper limit.
jobconf.json 1 MB Size limit 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 limit A view is not writable and does not support the INSERT operation.
Data type and position of a column Unmodifiable Operation limit The data type and position of a column are unmodifiable.
Java UDFs Not allowed to be abstract or static Operation limit Java UDFs cannot be abstract or static.
Partitions that can be queried 10,000 Quantity limit A maximum of 10,000 partitions can be queried.
SQL execution plans 1 MB Size limit The size of an execution plan generated from MaxCompute SQL statements cannot exceed 1 MB. Otherwise, the error message FAILED: ODPS-0010000:System internal error - The Size of Plan is too large appears.
Note The preceding MaxCompute SQL limits cannot be manually modified.