This topic describes the limits on developing databases in PolarDB-X.
PolarDB-X is highly compatible with the MySQL protocol and the SQL syntax of MySQL. However, specific limits are imposed on using SQL statements in PolarDB-X. This is because the architecture of a distributed database differs from that of a single-instance database. This topic describes the limits on database development.
Limits on common identifiers
Identifier | Maximum character length | Limits on the value |
---|---|---|
Database | 32 | The value can contain uppercase and lowercase letters, digits, and underscores (_). |
Sequence | 128 | The value can contain only characters that are encoded by using the Unicode standard. |
Table | 64 | |
Column | ||
Partition | ||
Partition Key | ||
View | ||
Sequence | ||
Variables | ||
Constraint |
Limits on resource usage
Resource | Type | Quantity |
---|---|---|
Logical resources | Database | Each cluster supports a maximum of 32 databases. |
Table | Each database supports a maximum of 8,192 tables. | |
Partition | Each table can contain a maximum of 8,192 partitions. | |
Column | Each table can contain a maximum of 1,017 columns. | |
Sequence | Each database supports a maximum of 16,384 sequences. | |
View | Each database supports a maximum of 8,192 views. | |
Global Index | Each table supports a maximum of 32 global indexes. | |
User | Each database supports a maximum of 2,048 users. A username can be a maximum of 255 characters in length. | |
Physical resources | The maximum number of connections that are supported by a compute node in a database | By default, a compute node supports a maximum of 20,000 connections. |
The maximum number of compute nodes that can be added to a database at a time | By default, you can add a maximum of 99 nodes at a time. If you want to add more nodes at a time, contact technical support. | |
The maximum number of storage nodes that can be added to a database at a time |
Limits on SQL syntax
Category | Operation | Limit |
---|---|---|
Custom operations | User-defined function | Not supported. |
Custom data type | Not supported. | |
Stored procedure | Not supported. | |
Trigger | Not supported. | |
Cursor | Not supported. | |
View | Support. | |
DDL | CREATE TABLE ... LIKE ... | Partitioned tables are not supported. |
CREATE TABLE ... SELECT ... | Partitioned tables are not supported. | |
RENAME TABLE | You cannot execute the RENAME statement to rename multiple tables at a time. | |
ALTER TABLE | You cannot execute the ALTER TABLE statement to change the data types of shard keys. | |
MERGE, SPLIT, ADD and DROP statements on subpartition tables | Not supported. | |
MERGE, SPLIT, ADD and DROP statements on partitioned index tables | Not supported. | |
Foreign Key | Not supported. | |
DML | STRAIGHT_JOIN | Not supported. |
NATURAL JOIN | Not supported. | |
INSERT DELAYED | Not supported. | |
PolarDB-X does not support variable references or operations in SQL statements. For example, you cannot execute the following statement: SET @c=1, @d=@c+1; SELECT @c, @d. | Not supported. | |
LOAD XML | Not supported. | |
DQL | Subqueries included in the HAVING clause | Not supported. |
Subqueries included in JOIN operations with the ON clause | Not supported. | |
Scalar subqueries that use equal signs (=) as operators | Not supported. | |
Database management | SHOW WARNINGS | The combination of LIMIT and COUNT is not supported for this statement. |
SHOW ERRORS | The combination of LIMIT and COUNT is not supported for this statement. | |
HELP | Not supported. | |
Operator | := | Not supported. |
Function | Full-text search functions | Not supported. |
XML functions | Not supported. | |
Functions used with global transaction identifiers | Not supported. | |
Data type | Spatial data types, such as GEOMETRY and LINESTRING | Not supported. |
JSON data types | Columns of JSON data types cannot be used as partition keys. | |
Keyword | MILLISECOND | Not supported. |
MICROSECOND | Not supported. |