All Products
Search
Document Center

AnalyticDB:Limits

Last Updated:Mar 14, 2025

To ensure the stability and security of the AnalyticDB for MySQL cluster, the following limits apply.

Naming constraints

Object

Naming rules

Database name

  • Up to 64 characters in length.

  • The name must start with a lowercase letter.

  • Can contain letters, digits, and underscores (_).

  • Cannot contain consecutive underscores (_).

  • Cannot be analyticdb, as analyticdb is a built-in database.

Table name

  • 1 to 127 characters in length.

  • The name must start with a letter or underscore (_).

  • Can contain letters, digits, and underscores (_).

  • Cannot contain quotation marks, exclamation points (!), or spaces.

  • Cannot be an SQL reserved keyword.

Column name

  • 1 to 127 characters in length.

  • The name must start with a letter or underscore (_).

  • Can contain letters, digits, and underscores (_).

  • Cannot contain quotation marks, exclamation points (!), or spaces.

  • Cannot be an SQL reserved keyword.

Index name

Cannot exceed 64 characters in length.

Account name

  • Length requirements:

    • For kernel versions earlier than 3.1.9.4, 2 to 16 characters.

    • For kernel versions 3.1.9.4 and later, 2 to 64 characters.

  • The name must start with a lowercase letter.

  • The name must end with a lowercase letter or digit.

  • Can contain lowercase letters, digits, and underscores (_).

Password

  • 8 to 32 characters in length.

  • Must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters.

  • Special characters are !@#¥%^&*()_+-=.

Cluster quotas

Limit

Default value

Description

Maximum number of clusters that can be purchased within each Alibaba Cloud account

30

Each Alibaba Cloud account can purchase up to 30 clusters. To change this value, submit a ticket to contact technical support.

Maximum number of databases that can be created for each cluster

2048

None

Total number of scale-in, scale-out, upgrade, and downgrade operations on each cluster per day

12

None

Data Lakehouse Edition cluster node disk space threshold

80%

If the threshold is exceeded, the system sends an alert notification. Each contact can receive up to four alert notifications for disk usage every day.

90%

If the threshold is exceeded, the system sends an alert notification, locks the cluster, and denies data write requests. Each contact can receive up to four alert notifications for disk usage every day.

Data Lakehouse Edition cluster maximum hot data size for a set of elastic I/O units

8 TB

If the amount of hot data for an EIU exceeds 8 TB, the system locks the cluster and denies data write requests. For more information, see the referenced document.

Data Lakehouse Edition cluster maximum hot data size for a set of reserved storage resources

8 TB

If the amount of hot data for a set of reserved storage resources exceeds 8 TB, the system locks the cluster and denies data write requests. For more information, see the referenced document.

Maximum number of standard accounts that can be created for each cluster

256

None

Maximum number of connections that can be established to each cluster

No more than 50000 (recommended)

AnalyticDB for MySQL clusters have no limit on the number of connections. However, the number of connections is related to the cluster specifications. Low-specification clusters cannot support excessive connections due to insufficient resources.

Maximum number of IP address whitelists that can be configured for each cluster

50

None

Maximum number of IP addresses that can be added to each whitelist

1000

None

Maximum number of IP addresses that can be added to whitelists in each cluster

25000

None

Maximum number of partitions in each cluster

102400

The total number of partitions in all tables in an AnalyticDB for MySQL cluster cannot exceed 102400. If the number of partitions in a cluster exceeds 102400, you cannot create partitioned tables in the cluster.

You can execute the following statement to query the number of partitions in all tables in each database:

SELECT SUM(partition_count) FROM database_name.KEPLER_META_TABLES WHERE table_engine_name IN ("CSTORE", "XUANWU", "XUANWU_V2");

Maximum number of internal tables in each Enterprise Edition or Basic Edition cluster

80000/(Number of shards/Number of reserved resource groups)

  • Number of shards/Number of reserved resource groups rounded up.
  • Enterprise Edition number of reserved resource groups = number of reserved resource nodes/3.
  • Basic Edition number of reserved resource groups = number of reserved resource nodes.

Methods to increase the maximum number of internal tables:

Maximum number of internal tables in each Data Lakehouse Edition or Data Lakehouse Edition elastic mode cluster

[80000/(Number of shards/Number of EIU groups)]*2

  • Number of shards/Number of EIU groups rounded up.
  • Data Lakehouse Edition number of EIU groups = reserved storage resources/24 ACU.
  • Data Lakehouse Edition elastic mode number of EIU groups = number of elastic I/O resource groups.

Methods to increase the maximum number of internal tables:

Maximum number of tables in each Data Lakehouse Edition reserved mode cluster (with 1 to 20 node groups)

80000/(Number of shards/Number of node groups)

Number of shards/Number of node groups rounded up.

Increase the number of node groups to increase the maximum number of internal tables in a Data Lakehouse Edition reserved mode cluster.

Maximum number of external tables in each cluster

500,000

None

Maximum number of columns in each table

4096

None

Maximum storage data size of a single partition within a shard

2.1 billion rows

A single partition within a shard can store up to 2.1 billion rows of data.

Maximum length of comments in each table

1024 characters

None

Maximum length of comments in each column

1024 characters

None

Maximum length of a single field in each column

16 MB

None

Maximum length of data that can be written to each row

16 MB

None

Default length of each column

127 characters

None

Maximum number of columns that can be contained in each query

1024

None

Maximum number of items that can be specified in each WHERE clause

256

None

Maximum number of conditions that can be specified in each IN operator

2000

Adjust the parameter value: SET adb_config MAX_IN_ITEMS_COUNT=3000;.

A larger value makes an SQL query more complex and may affect query performance.

Timeout limits

Operation

Time limit (ms)

Timeout limits

Create a cluster

600000

None

Delete a cluster

300000

None

Scale out a cluster

600000

None

Create a database

10000

None

Delete a database

10000

None

Create a table or view

10000

None

Delete a table or view

10000

None

Truncate a table

60000

None

Add a column

10000

None

Delete a column

60000

None

Update a column

60000

None

Perform a single query

1800000

The timeout period for a query. When a query times out, the system ends the query.

You can modify the timeout period for a query by using the following parameter and hint.

  • Parameter: QUERY_TIMEOUT

  • Hint: query_timeout

Note

The system checks queries for timeout errors every 1,000 milliseconds. The execution duration of a query must be set to a value greater than 1,000 milliseconds. Otherwise, the query_timeout hint may not take effect.

Insert data

300000

None

  • INSERT SELECT FROM

  • INSERT UPDATE FROM

  • INSERT DELETE FROM

24×3,600,000

The timeout period of the execution. When an INSERT statement times out, the system ends the statement.

You can modify the timeout period for an INSERT statement by using the following parameter and hint.

  • Parameter: INSERT_SELECT_TIMEOUT

  • Hint: insert_select_timeout

FAQ

Is the number of shards in a cluster the same as the number of shards in a table?

Yes, if the number of shards is 32 for a cluster, each table in the cluster can contain 32 shards.

How to query the number of shards?

  • The number of shards is determined when an AnalyticDB for MySQL cluster is created. The number of shards in a Data Lakehouse Edition cluster can be modified after the cluster is created, but the Enterprise Edition, Basic Edition, and Data Lakehouse Edition do not support modification.

    The following tables describe the mappings between the number of shards and cluster specifications.

    Enterprise Edition, Basic Edition, Data Lakehouse Edition, Data Lakehouse Edition elastic mode

    Number of reserved resource groups/Number of EIU groups/Number of elastic I/O resource groups

    Number of shards

    0, 1

    64

    2 to 3

    64

    4 to 7

    96

    8 to 15

    256

    16 to 31

    384

    32 to 63

    512

    >64

    1024

    Note
    • Enterprise Edition number of reserved resource groups = number of reserved resource nodes ÷ 3.

    • Basic Edition number of reserved resource groups = number of reserved resource nodes.

    • Data Lakehouse Edition number of EIU groups = reserved storage resources ÷ 24 ACU.

    Data Lakehouse Edition reserved mode

    Number of node groups

    Number of shards

    1

    16

    2 to 3

    64

    4 to 7

    96

    8 to 15

    236

    16 to 31

    384

    32 to 63

    512

    >64

    1024

  • You can also execute an SQL query to retrieve the number of shards in a cluster: SELECT count(1) FROM information_schema.kepler_meta_shards;.