Limits on database development
PolarDB-X is highly compatible with the MySQL protocol and the SQL syntax of MySQL. However, the architecture of a distributed database differs from that of a standalone database. Therefore, specific limits are imposed on the SQL statements used in PolarDB-X.
This topic describes the limits on identifies, resources, and SQL statements that are involved in the database development in PolarDB-X.
Limits on common identifiers
| Identifier | Maximum length | Limits |
|---|---|---|
| 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. |
| Partition | 16 | The value can contain only characters that are encoded by using the Unicode standard. |
| Table | 64 | The value can contain only characters that are encoded by using the Unicode standard. |
| Column | 64 | The value can contain only characters that are encoded by using the Unicode standard. |
| Partition Key | 64 | The value can contain only characters that are encoded by using the Unicode standard. |
| View | 64 | The value can contain only characters that are encoded by using the Unicode standard. |
| Variables | 64 | The value can contain only characters that are encoded by using the Unicode standard. |
| Constraint | 64 | The value can contain only characters that are encoded by using the Unicode standard. |
Limits on resource usage
| Resource | Type | Quantity |
|---|---|---|
| Logical resources | Database | Each cluster can contain a maximum of 32 databases. |
| Logical resources | Table | Each database can contain a maximum of 8,192 tables. |
| Logical resources | Partition | Each table can contain a maximum of 8,192 partitions. |
| Logical resources | Column | Each table can contain a maximum of 1,017 columns. |
| Logical resources | Sequence | Each database supports a maximum of 16,384 sequences. |
| Logical resources | View | Each database supports a maximum of 8,192 views. |
| Logical resources | Global Index | Each table supports a maximum of 32 global indexes. |
| Logical resources | User | Each database supports a maximum of 2,048 users. A username contains a maximum of 255 characters. |
| Physical resources | The maximum number of connections supported by a compute node in a database | By default, a compute node supports a maximum of 20,000 connections. |
| Physical resources | 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 Alibaba Cloud technical support. |
| Physical resources | The maximum number of storage 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 Alibaba Cloud technical support. |
Limits on SQL syntax
| Category | Operation | Limit |
|---|---|---|
| Custom operations | User-defined function | Supported. |
| Custom operations | Custom data type | Not supported. |
| Custom operations | Stored procedure | Supported. |
| Custom operations | Trigger | Not supported. |
| Custom operations | Cursor | Not supported. |
| Custom operations | View | Supported. |
| DDL | CREATE TABLE ... LIKE ... | Partitioned tables are not supported. |
| DDL | CREATE TABLE ... SELECT ... | Partitioned tables are not supported. |
| DDL | CREATE TABLE ... Generated Column ... | Supported. |
| DDL | RENAME TABLE | Supported. |
| DDL | ALTER TABLE | Supported. |
| DDL | MERGE, SPLIT, ADD and DROP statements on subpartition tables | Not supported. |
| DDL | MERGE, SPLIT, ADD and DROP statements on partitioned index tables | Not supported. |
| DDL | Foreign key | Not supported. |
| DML | STRAIGHT_JOIN | Not supported. |
| DML | NATURAL JOIN | Not supported. |
| DML | INSERT DELAYED | Not supported. |
| DML | Variable references or operations, such as SET @c=1, @d=@c+1; SELECT @c, @d | Not supported. |
| DML | LOAD XML | Not supported. |
| DQL | Subqueries included in the HAVING clause. | Not supported. |
| DQL | Subqueries included in JOIN operations with the ON clause | Not supported. |
| DQL | The Subquery as Scalar Operand | Supported. |
| Database management | SHOW WARNINGS | The combination of LIMIT and COUNT is not supported for this statement. |
| Database management | SHOW ERRORS | The combination of LIMIT and COUNT is not supported for this statement. |
| Database management | HELP | Not supported. |
| Operator | := | Not supported. |
| Function | Full-text search functions | Not supported. |
| Function | XML functions | Not supported. |
| Function | Functions used with global transaction identifiers | Not supported. |
| Type | Spatial data types, such as GEOMETRY and LINESTRING | Not supported. |
| Type | JSON data types | Columns of JSON data types cannot be used as partition keys. |
| Keyword | MILLISECOND | Not supported. |
| Keyword | MICROSECOND | Not supported. |