From c620cb8727b351c5eb04604d99f3f17a97bc415d Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:00:45 +0800 Subject: [PATCH 1/4] Add TiDB limitations --- TOC.md | 1 + tidb-limitations.md | 75 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 tidb-limitations.md diff --git a/TOC.md b/TOC.md index c62831dd44623..2130f84136da4 100644 --- a/TOC.md +++ b/TOC.md @@ -11,6 +11,7 @@ + [Key Features](/key-features.md) + Compatibility + [MySQL Compatibility](/mysql-compatibility.md) + + [TiDB Limitations](/tidb-limitations.md) + Quick Start + [Try Out TiDB](/quick-start-with-tidb.md) + [Learn TiDB SQL](/basic-sql-operations.md) diff --git a/tidb-limitations.md b/tidb-limitations.md new file mode 100644 index 0000000000000..f2096e18f7720 --- /dev/null +++ b/tidb-limitations.md @@ -0,0 +1,75 @@ +--- +title: TiDB Limitations +summary: Learn the limitations of TiDB. +category: introduction +--- + +# TiDB Limitations + +This document describes the common limitations of TiDB, including the maximum identifier length and the maximum count of supported databases, tables, indexes, partitioned tables, and sequences. + +## Limitation on identifier length + +| Identifier type | Maximum length (character) | +|:---------|:--------------| +| Database | 64 | +| Table | 64 | +| Column | 64 | +| Index | 64 | +| View | 64 | +| Sequence | 64 | + +## Limitation on the total count of databases, tables, views, and connections + +| Identifier type | Maximum count | +|:----------|:----------| +| Databases | unlimited | +| Tables | unlimited | +| Views | unlimited | +| Connections| unlimited| + +## Limitation on a single database + +| Type | Upper limit | +|:----------|:----------| +| Tables | unlimited | + +## Limitation on a single table + +| Type | Upper limit | +|:----------|:----------| +| Columns | 512 | +| Indexes | 64 | +| Rows | unlimited | +| Size | unlimited | +| Partitions | 1024 | + +## Limitation on a single row + +| Type | Upper limit | +|:----------|:----------| +| Size | 6 MB | + +## Limitation on a single column + +| Type | Upper limit | +|:----------|:----------| +| Size | 6 MB | + +## Limitation on string types + +| Type | Upper limit | +|:----------|:----------| +| CHAR | 256 characters | +| BINARY | 256 characters | +| VARBINARY | 65535 characters | +| VARCHAR | 16383 characters | +| TEXT | 6MB bytes | +| BLOB | 6MB bytes | + +## Limitation on SQL statements + +| Type | Upper limit | +|:----------|:----------| +| The number of key-value pairs written in a single `INSERT` statement | 3000000 | +| The number of rows written in a single transaction | 3000000 / The number of indexes on a single table | From f8f2b670d96be241423113c60b9b7c94ebf190df Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:04:08 +0800 Subject: [PATCH 2/4] Update tidb-limitations.md --- tidb-limitations.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tidb-limitations.md b/tidb-limitations.md index f2096e18f7720..f145fc8c8b69a 100644 --- a/tidb-limitations.md +++ b/tidb-limitations.md @@ -71,5 +71,4 @@ This document describes the common limitations of TiDB, including the maximum id | Type | Upper limit | |:----------|:----------| -| The number of key-value pairs written in a single `INSERT` statement | 3000000 | -| The number of rows written in a single transaction | 3000000 / The number of indexes on a single table | +| The number of SQL statements in a single transaction | When the optimistic transaction is used and the transaction retry is enabled, the default upper limit is 5000, which can be changed through [`stmt-count-limit`](/tidb-configuration-file.md#stmt-count-limit). | From 82b10d11b468c00657442be28e7e995f4b5ef0f3 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 16 Jun 2020 18:29:06 +0800 Subject: [PATCH 3/4] address comments from lilian --- tidb-limitations.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tidb-limitations.md b/tidb-limitations.md index f145fc8c8b69a..42c5542e1c831 100644 --- a/tidb-limitations.md +++ b/tidb-limitations.md @@ -1,16 +1,16 @@ --- title: TiDB Limitations -summary: Learn the limitations of TiDB. +summary: Learn the usage limitations of TiDB. category: introduction --- # TiDB Limitations -This document describes the common limitations of TiDB, including the maximum identifier length and the maximum count of supported databases, tables, indexes, partitioned tables, and sequences. +This document describes the common usage limitations of TiDB, including the maximum identifier length and the maximum number of supported databases, tables, indexes, partitioned tables, and sequences. -## Limitation on identifier length +## Limitations on identifier length -| Identifier type | Maximum length (character) | +| Identifier type | Maximum length (number of characters allowed) | |:---------|:--------------| | Database | 64 | | Table | 64 | @@ -19,22 +19,22 @@ This document describes the common limitations of TiDB, including the maximum id | View | 64 | | Sequence | 64 | -## Limitation on the total count of databases, tables, views, and connections +## Limitations on the total number of databases, tables, views, and connections -| Identifier type | Maximum count | +| Identifier type | Maximum number | |:----------|:----------| | Databases | unlimited | | Tables | unlimited | | Views | unlimited | | Connections| unlimited| -## Limitation on a single database +## Limitations on a single database | Type | Upper limit | |:----------|:----------| | Tables | unlimited | -## Limitation on a single table +## Limitations on a single table | Type | Upper limit | |:----------|:----------| @@ -56,7 +56,7 @@ This document describes the common limitations of TiDB, including the maximum id |:----------|:----------| | Size | 6 MB | -## Limitation on string types +## Limitations on string types | Type | Upper limit | |:----------|:----------| @@ -64,11 +64,11 @@ This document describes the common limitations of TiDB, including the maximum id | BINARY | 256 characters | | VARBINARY | 65535 characters | | VARCHAR | 16383 characters | -| TEXT | 6MB bytes | -| BLOB | 6MB bytes | +| TEXT | 6 MB bytes | +| BLOB | 6 MB bytes | ## Limitation on SQL statements | Type | Upper limit | |:----------|:----------| -| The number of SQL statements in a single transaction | When the optimistic transaction is used and the transaction retry is enabled, the default upper limit is 5000, which can be changed through [`stmt-count-limit`](/tidb-configuration-file.md#stmt-count-limit). | +| The maximum number of SQL statements in a single transaction | When the optimistic transaction is used and the transaction retry is enabled, the default upper limit is 5000, which can be modified using [`stmt-count-limit`](/tidb-configuration-file.md#stmt-count-limit). | From 6d146f459b8e7f6afdc21003bc6a0f9967ab3b5b Mon Sep 17 00:00:00 2001 From: Lilian Lee Date: Tue, 16 Jun 2020 23:05:20 +0800 Subject: [PATCH 4/4] Update tidb-limitations.md --- tidb-limitations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tidb-limitations.md b/tidb-limitations.md index 42c5542e1c831..fd8e52b81552e 100644 --- a/tidb-limitations.md +++ b/tidb-limitations.md @@ -67,7 +67,7 @@ This document describes the common usage limitations of TiDB, including the maxi | TEXT | 6 MB bytes | | BLOB | 6 MB bytes | -## Limitation on SQL statements +## Limitations on SQL statements | Type | Upper limit | |:----------|:----------|