The topic describes all 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.
Comment length 1,024 bytes Length A comment is a valid string that can be up to 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.
Statistical definitions of a table 100 Quantity A table can contain a maximum of 100 statistical definitions.
Statistical definition length of a table 64,000 Length The length of statistical definitions in a table cannot exceed 64,000.
Screen display 10,000 rows Quantity A SELECT statement can generate a maximum of 10,000 rows.
INSERT targets 256 Quantity In a MULTI INSERT task, you can insert data into a maximum of 256 tables at a time.
UNION ALL 256 tables Quantity A UNION ALL operation can be performed on a maximum of 256 tables.
MAPJOIN 128 small tables Quantity A MAPJOIN operation can be performed on a maximum of 128 small tables.
MAPJOIN memory 512 MB Quantity The memory size for all small tables on which the MAPJOIN operation is performed cannot exceed 512 MB.
Window functions 5 Quantity A SELECT statement can contain a maximum of five window functions.
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 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 A WHERE clause can contain a maximum of 256 conditions.
Length of a column record 8 MB Quantity The maximum length of a column record in a table is 8 MB.
IN parameters 1024 Quantity This item specifies the maximum number of parameters in an IN clause, such as in (1,2,3....,1024). Excess parameters can slow down the compilation process. We recommend that you use no more than 1,024 parameters, but this is not a fixed upper limit.
jobconf.json 1 MB Length The maximum size of the jobconf.json file is 1 MB. If a table contains a large number of partitions, the size of jobconf.json may exceed 1 MB.
View Not writable Operation A view is not writable and does not support the INSERT operation.
Data type and position of a column Unmodifiable Operation The data type and position of a column are unmodifiable.
Java UDFs Not allowed to be abstract or static Operation Java UDFs cannot be abstract or static.
Partitions to query 10,000 Quantity A maximum of 10,000 partitions can be queried.
Note The preceding MaxCompute SQL limits cannot be modified manually.