All Products
Search
Document Center

Tablestore:SQL limits

Last Updated:Oct 18, 2023

This topic describes the limits on SQL queries.

Limits on configurations

Important

The database names, table names, and column names cannot be the reserved words or keywords in SQL. For more information about reserved words and keywords, see Reserved words and keywords.

Item

Limit

Description

Database name length

3 to 16 bytes

The database name corresponds to the instance name.

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

Table name length

1 to 255 bytes

The table name corresponds to the data table name or index table name.

The table name can contain letters, digits, and underscores (_). The name must start with a letter or an underscore (_).

Column name length

1 to 255 bytes

The column name corresponds to the column name in a data table or index table.

The column name can contain letters, digits, and underscores (_). The name must start with a letter or an underscore (_).

Size of the value in a primary key column of the STRING type

1 KB

The size of the value in a primary key column of the STRING type cannot exceed 1 KB.

Size of the value in an attribute column of the STRING type

2 MB

The size of the value in an attribute column of the STRING type cannot exceed 2 MB.

Size of the value in a primary key column of the Binary (Blob) type

1 KB

The size of the value in a primary key column of the Binary (Blob) type cannot exceed 1 KB.

Size of the value in an attribute column of the Binary (Blob) type

2 MB

The size of the value in an attribute column of the Binary (Blob) type cannot exceed 2 MB.

Limits on operations

Item

Limit

Description

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.

Single execution duration

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.

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.