This topic describes the limits of SQL.

Configuration limits

Notice The database names, table names, and column names cannot be the reserved words or keywords in SQL. For more information about the 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 (_).

Number of columns 1 to 32

If your business requirements are not met due to the limit, submit a ticket.

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.

Operation limits

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 time 30s The single execution time 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.