TiDB Limitations
+9
O
d
F
q
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.
Limitations on identifier length
| Identifier type | Maximum length (number of characters allowed) |
|---|---|
| Database | 64 |
| Table | 64 |
| Column | 64 |
| Index | 64 |
| View | 64 |
| Sequence | 64 |
Limitations on the total number of databases, tables, views, and connections
| Type | Maximum number |
|---|---|
| Databases | unlimited |
| Tables | unlimited |
| Views | unlimited |
| Connections | unlimited |
Limitations on a single database
| Type | Upper limit |
|---|---|
| Tables | unlimited |
Limitations on a single table
| Type | Upper limit (default value) |
|---|---|
| Columns | Defaults to 1017 and can be adjusted up to 4096 |
| Indexes | Defaults to 64 and can be adjusted up to 512 |
| Rows | unlimited |
| Size | unlimited |
| Partitions | 8192 |
- The upper limit of
Columnscan be modified viatable-column-count-limit. - The upper limit of
Indexescan be modified viaindex-limit.
Limitation on a single row
| Type | Upper limit (default value) |
|---|---|
| Size | Defaults to 6 MiB and can be adjusted to 120 MiB |
You can adjust the size limit via the txn-entry-size-limit configuration item.
Limitations on indexes
The maximum index length is 3072 bytes, equivalent to 768 characters using 4-byte UTF-8 encoding. The maximum number of columns in a single index is limited to 16.
You can adjust this limit using the max-index-length configuration item.
Limitations on data types
| Type | Upper limit |
|---|---|
| CHAR | 255 characters |
| BINARY | 255 bytes |
| VARBINARY | 65535 bytes |
| VARCHAR | 16383 characters |
| TEXT | 65535 bytes |
| BLOB | 65535 bytes |
Limitations on SQL statements
| Type | Upper limit |
|---|---|
| The maximum number of SQL statements in a single transaction | When the optimistic transaction is used and the transaction retry is enabled, the upper limit is 5000. |
You can modify the limit via the stmt-count-limit configuration item.
Limitations on TiKV version
In your cluster, if the version of the TiDB component is v6.2.0 or later, the version of TiKV must be v6.2.0 or later.
TiDB Limitationswas last updated 9/11/2025, 3:25:10 AM: tidb-limitation: update the limit info of TEXT and BLOB (#21750)