All Products
Search
Document Center

Tablestore:Limits on SQL queries

Last Updated:May 28, 2025

This topic describes the limits on SQL queries.

Limits on configurations

Item

Limit

Description

Database name

Unique within a region

The database name corresponds to the instance name. The database name must meet the following requirements:

The database name can contain letters, digits, and hyphens (-). The name must start with a letter and cannot end with a hyphen (-).

  • The name must be 3 to 16 bytes in length and can contain letters, digits, and hyphens (-).

  • The name must start with a letter and cannot end with a hyphen (-).

  • The name must be different from the reserved words and keywords in SQL. For more information, see Reserved words and keywords.

Mapping table name

Unique within a database

The table name corresponds to the data table name or index table name. The table name must meet the following requirements:

  • The name must be 1 to 255 bytes in length and can contain letters, digits, and underscores (_).

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

  • The name must be different from the reserved words and keywords in SQL. For more information, see Reserved words and keywords.

Column name

Unique within a table

The column name corresponds to the column name in a data table or index table. The column name must meet the following requirements:

  • The name must be 1 to 255 bytes in length and can contain letters, digits, and underscores (_).

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

  • The name must be different from the reserved words and keywords in SQL. For more information, see Reserved words and keywords.

Data types of primary key columns

VARCHAR, BIGINT, and VARBINARY

  • VARCHAR: a string that does not exceed 1 KB in length. We recommend that you set the maximum length of the primary key column values to 1,024 by using VARCHAR(1024).

  • BIGINT: a 64-bit signed integer that is 8 bytes in length.

  • VARBINARY: binary data that does not exceed 1 KB in length. We recommend that you set the maximum length of the primary key column values to 1,024 by using VARBINARY(1024).

Data types of attribute columns

MEDIUMTEXT, BIGINT, DOUBLE, MEDIUMBLOB, and BOOL

  • MEDIUMTEXT: a string that does not exceed 2 MB in length.

  • BIGINT: a 64-bit signed integer that is 8 bytes in length.

  • DOUBLE: a 64-bit signed integer that is 8 bytes in length.

  • MEDIUMBLOB: binary data that does not exceed 2 MB in length.

  • BOOL: True or False that is 1 byte in length.

Limits on operations

Item

Limit

Description

Execution duration of a single SQL statement

30 seconds

The execution duration of a single SQL statement is related to the complexity of the SQL statement and the amount of data in the table. The maximum duration is 30 seconds. If the maximum duration is exceeded, the system returns an error.

Amount of data for a single scan

128 MB or 100,000 rows

The maximum number of rows for a single scan is 100,000 or the maximum amount of data for a single scan is 128 MB. If the upper limit is exceeded, the system returns an error.

Data type and position of a column

Unmodifiable

The data type and position of a column cannot be modified.

Case sensitivity

Not case-sensitive

The table names and column names in Tablestore are both case-sensitive. When SQL is used, the Tablestore table names and column names are converted into lowercase letters for matching. In this case, if you want to perform operations on the Aa column in a Tablestore table, you can use AA, aa, aA, or Aa in SQL. Therefore, the table names or column names in Tablestore cannot be AA, aa, aA, and Aa at the same time.