AnalyticDB for MySQL enforces the following limits to maintain cluster stability and security.
Naming limits
Most naming rules apply to all object types. Unless a rule below specifies otherwise:
Names can contain letters, digits, and underscores (
_).Names cannot contain single quotation marks (
'), double quotation marks ("), exclamation points (!), or spaces.
| Object | Constraint |
|---|---|
| Database name | Up to 64 characters. Must start with a lowercase letter. Cannot contain consecutive underscores (__). Cannot be analyticdb (reserved for the built-in database). |
| Table name | Up to 127 characters. Must start with a letter or underscore (_). Cannot be an SQL reserved keyword. |
| Column name | Up to 127 characters. Must start with a letter or underscore (_). Cannot be an SQL reserved keyword. |
| Index name | Up to 64 characters. |
| Account name | 2–16 characters (clusters earlier than V3.1.9.4) or 2–64 characters (V3.1.9.4 and later). Must start with a lowercase letter and end with a lowercase letter or digit. Can contain lowercase letters, digits, and underscores (_). |
| Password | 8–32 characters. Must include at least three of the following: uppercase letters, lowercase letters, digits, and special characters (! @ # ¥ % ^ & * ( ) _ + - =). |
Quota limits
| Category | Limit | Default | Adjustable | Notes |
|---|---|---|---|---|
| Cluster | Max clusters per Alibaba Cloud account | 30 | Yes | Submit a ticket to increase. |
| Cluster | Max scaling operations (scale-in, scale-out, upgrade, downgrade) per cluster per day | 12 | No | — |
| Database | Max databases per cluster | 2,048 | No | — |
| Storage | Max disk usage before alert (Data Warehouse Edition, reserved mode) | 80% | No | The system sends up to four alert notifications per contact per day when this threshold is exceeded. |
| Storage | Max disk usage before cluster lock (Data Warehouse Edition, reserved mode) | 90% | No | The system locks the cluster and denies write requests. Up to four alert notifications per contact per day. |
| Storage | Max hot data per elastic I/O unit (EIU) (Data Warehouse Edition, elastic mode) | 8 TB | No | The system locks the cluster and denies write requests. To resolve, scale out elastic I/O resources. |
| Storage | Max hot data per set of reserved storage resources (Data Lakehouse Edition) | 8 TB | No | The system locks the cluster and denies write requests. To resolve, scale up reserved storage resources. |
| Storage | Max hot data per set of reserved resources (Enterprise Edition or Basic Edition) | 8 TB | No | The system locks the cluster and denies write requests. To resolve, scale up reserved resources. |
| Account | Max standard accounts per cluster | 256 | No | — |
| Connection | Max connections per cluster (recommended) | 50,000 | No | Actual capacity varies by cluster specifications. Low-specification clusters may not support high connection counts. |
| Whitelist | Max IP whitelists per cluster | 50 | No | — |
| Whitelist | Max IP addresses per whitelist | 1,000 | No | — |
| Whitelist | Max IP addresses across all whitelists per cluster | 25,000 | No | — |
| Table | Max partitions per cluster | 102,400 | No | Applies to all tables combined. If exceeded, you cannot create partitioned tables. Run the query below to check current usage. |
| Table | Max internal tables (Enterprise Edition or Basic Edition) | 80000 / ⌈Number of shards / Number of sets of reserved resources⌉ | Yes | To increase: scale up reserved resources (Enterprise Edition). Basic Edition does not support increasing this limit. |
| Table | Max internal tables (Data Lakehouse Edition or Data Warehouse Edition, elastic mode) | [80000 / ⌈Number of shards / Number of EIUs⌉] × 2 | Yes | To increase: scale up reserved storage resources (Data Lakehouse Edition); increase the number of EIUs (Data Warehouse Edition, elastic mode). |
| Table | Max internal tables (Data Warehouse Edition, reserved mode, 1–20 node groups) | 80000 / ⌈Number of shards / Number of node groups⌉ | Yes | To increase: add more node groups. |
| Table | Max external tables per cluster | 500,000 | No | — |
| Table | Max columns per table | 4,096 | No | — |
| Table | Max comment length per table | 1,024 characters | No | — |
| Table | Default column length | 127 characters | — | — |
| Column | Max comment length per column | 1,024 characters | No | — |
| Column | Max field length per column | 16 MB | No | — |
| Row | Max row write size | 16 MB | No | — |
| Partition | Max data entries per partition per shard | 2.1 billion | No | — |
| Query | Max columns per query | 1,024 | No | — |
| Query | Max items in each WHERE clause | 256 | No | — |
| Query | Max conditions in each IN operator | 2,000 | Yes | To increase, run SET adb_config MAX_IN_ITEMS_COUNT=3000;. Higher values increase query complexity and may affect performance. |
Formula notes for internal table limits:
Enterprise Edition: sets of reserved resources = reserved resource nodes / 3
Basic Edition: sets of reserved resources = reserved resource nodes
Data Lakehouse Edition: EIUs = reserved storage resources / 24 ACUs (AnalyticDB Capacity Units)
Data Warehouse Edition in elastic mode: EIUs = number of sets of elastic I/O resources
To check the total partition count across all tables, run:
SELECT SUM(partition_count) FROM INFORMATION_SCHEMA.KEPLER_META_TABLES
WHERE table_engine_name IN ('CSTORE', 'XUANWU', 'XUANWU_V2');Timeout limits
| Operation | Timeout (ms) |
|---|---|
| Create a cluster | 600,000 |
| Delete a cluster | 300,000 |
| Scale up a cluster | 600,000 |
| Create a database | 10,000 |
| Delete a database | 10,000 |
| Create a table or view | 10,000 |
| Delete a table or view | 10,000 |
| Truncate a table | 60,000 |
| Add a column | 10,000 |
| Remove a column | 60,000 |
| Update a column | 60,000 |
| Perform a single query | 1,800,000 |
| Insert data | 300,000 |
| INSERT SELECT FROM, INSERT UPDATE FROM, INSERT DELETE FROM | 86,400,000 |
Query timeout: When a query exceeds the timeout, the system ends it. Configure the timeout using the QUERY_TIMEOUT parameter or the query_timeout hint.
The system checks for query timeouts every 1,000 milliseconds. Set query_timeout to a value greater than 1,000 milliseconds, or the hint may not take effect.INSERT timeout: When an INSERT statement exceeds the timeout, the system ends it. Configure the timeout using the INSERT_SELECT_TIMEOUT parameter or the insert_select_timeout hint.
FAQ
Does the cluster shard count apply per table?
Yes. If a cluster has 32 shards, each table in that cluster has 32 shards.
How do I find the shard count for my cluster?
Run the following statement:
SELECT count(1) FROM information_schema.kepler_meta_shards;The shard count is set when the cluster is created. You can change the shard count only for Data Warehouse Edition clusters — it cannot be changed for Enterprise Edition, Basic Edition, or Data Lakehouse Edition clusters.
The following tables map cluster specifications to shard counts.
Enterprise Edition, Basic Edition, Data Lakehouse Edition, and Data Warehouse Edition in elastic mode
| Sets of reserved resources or EIUs | Shards |
|---|---|
| 0–1 | 64 |
| 2–3 | 64 |
| 4–7 | 96 |
| 8–15 | 256 |
| 16–31 | 384 |
| 32–63 | 512 |
| ≥64 | 1,024 |
Notes:
Enterprise Edition: sets of reserved resources = reserved resource nodes / 3
Basic Edition: sets of reserved resources = reserved resource nodes
Data Lakehouse Edition: EIUs = reserved storage resources / 24 ACUs
Data Warehouse Edition in reserved mode
| Node groups | Shards |
|---|---|
| 1 | 16 |
| 2–3 | 64 |
| 4–7 | 96 |
| 8–15 | 236 |
| 16–31 | 384 |
| 32–63 | 512 |
| >64 | 1,024 |