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
| Item | Limit | Adjustable | Behavior when exceeded | Description |
|---|
| Table or column name length | 128 bytes | No | — | Names can contain only letters, digits, and underscores (_). Names must start with a letter. Special characters are not supported. |
| Comment length | 1,024 bytes | No | — | A comment must be a valid string and cannot exceed 1,024 bytes. |
Quantity limits
| Item | Limit | Adjustable | Behavior when exceeded | Description |
|---|
| Column definitions per table | 1,200 | No | — | A table can contain a maximum of 1,200 column definitions. |
| Partitions per table | 60,000 | No | — | A table can contain a maximum of 60,000 partitions. |
| Partition levels per table | 6 | No | — | A table supports a maximum of six partition levels. |
SELECT output rows | 10,000 rows | No | — | A SELECT statement returns a maximum of 10,000 rows. |
Destination tables for MULTI-INSERT | 256 | No | — | A MULTI-INSERT statement can write to a maximum of 256 tables in one operation. |
Tables combined by UNION ALL | 256 | No | — | A UNION ALL statement can combine a maximum of 256 tables. |
Small tables in a MAPJOIN | 128 | No | — | A MAPJOIN hint allows you to join a maximum of 128 small tables. |
Memory for MAPJOIN small tables | 512 MB | No | — | The total memory for all small tables in a MAPJOIN cannot exceed 512 MB. |
Rows from ptinsubq (partition in subquery) | 1,000 rows | No | — | A PT IN SUBQUERY statement can generate a maximum of 1,000 rows. |
| Partitions that can be queried | 10,000 | No | — | A maximum of 10,000 partitions can be queried. |
Parameters in an IN clause | 1,024 (recommended) | — | Compilation performance degrades | More 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
| Item | Limit | Adjustable | Behavior when exceeded | Description |
|---|
| SQL statement length | 2 MB | No | — | An SQL statement cannot exceed 2 MB. This applies when running statements through the SDK. |
| Column record length | 8 MB | No | — | A column record in a table cannot exceed 8 MB. |
jobconf.json file size | 1 MB | No | — | The jobconf.json file cannot exceed 1 MB. Tables with many partitions are more likely to hit this limit. |
| SQL execution plan size | 1 MB | No | Job fails with FAILED: ODPS-0010000:System internal error - The Size of Plan is too large | An execution plan generated by MaxCompute SQL cannot exceed 1 MB. |
Execution limits
| Item | Limit | Adjustable | Behavior when exceeded | Description |
|---|
| Maximum job execution duration | 72 hours | No | Job is stopped automatically | The 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
| Item | Limit | Adjustable | Behavior when exceeded | Description |
|---|
| Partition creation rate | 120 times per 15 seconds | No | — | The ALTER TABLE <table_name> ADD PARTITION <pt_spec> operation is limited to 120 executions per 15 seconds. |
Operation limits
| Item | Limit | Adjustable | Behavior when exceeded | Description |
|---|
| View writability | Not writable | No | — | Views do not support INSERT statements. |
| Column data type and position | Unmodifiable | No | — | The data type and position of an existing column cannot be changed. |
| Java user-defined functions (UDFs) | Cannot be abstract or static | No | — | Java UDFs must be non-abstract and non-static. |