Skip to content

Commit

Permalink
tidb-configuration-file: add more notes to txn-entry-size-limit (#10629)
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Oct 26, 2022
1 parent 92af013 commit 406eb18
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions tidb-configuration-file.md
Expand Up @@ -362,6 +362,8 @@ Configuration items related to performance.
- Default value: `6291456` (in bytes)
- The size limit of a single key-value record in a transaction. If the size limit is exceeded, TiDB returns the `entry too large` error. The maximum value of this configuration item does not exceed `125829120` (120 MB).
- Note that TiKV has a similar limit. If the data size of a single write request exceeds [`raft-entry-max-size`](/tikv-configuration-file.md#raft-entry-max-size), which is 8 MB by default, TiKV refuses to process this request. When a table has a row of large size, you need to modify both configurations at the same time.
- The default value of [`max_allowed_packet`](/system-variables.md#max_allowed_packet-new-in-v610) (the maximum size of a packet for the MySQL protocol) is 67108864 (64 MiB). If a row is larger than `max_allowed_packet`, the row gets truncated.
- The default value of [`txn-total-size-limit`](#txn-total-size-limit) (the size limit of a single transaction in TiDB) is 100 MiB. If you increase the `txn-entry-size-limit` value to be over 100 MiB, you need to increase the `txn-total-size-limit` value accordingly.

### `txn-total-size-limit`

Expand Down
20 changes: 13 additions & 7 deletions tidb-limitations.md
Expand Up @@ -53,9 +53,9 @@ This document describes the common usage limitations of TiDB, including the maxi

## Limitation on a single row

| Type | Upper limit |
| Type | Upper limit (default value) |
|:----------|:----------|
| Size | 6 MB |
| Size | Defaults to 6 MiB and can be adjusted to 120 MiB |

<CustomContent platform="tidb">

Expand All @@ -65,20 +65,26 @@ You can adjust the size limit via the [`txn-entry-size-limit`](/tidb-configurati

## Limitation on a single column

| Type | Upper limit |
| Type | Upper limit (default value) |
|:----------|:----------|
| Size | 6 MB |
| Size | Defaults to 6 MiB and can be adjusted to 120 MiB |

<CustomContent platform="tidb">

You can adjust the size limit via the [`txn-entry-size-limit`](/tidb-configuration-file.md#txn-entry-size-limit-new-in-v50) configuration item.

</CustomContent>

## Limitations on string types
## Limitations on data types

| Type | Upper limit |
|:----------|:----------|
| CHAR | 256 characters |
| BINARY | 256 characters |
| VARBINARY | 65535 characters |
| VARCHAR | 16383 characters |
| TEXT | 6 MB |
| BLOB | 6 MB |
| TEXT | Defaults to 6 MiB and can be adjusted to 120 MiB |
| BLOB | Defaults to 6 MiB and can be adjusted to 120 MiB |

## Limitations on SQL statements

Expand Down

0 comments on commit 406eb18

Please sign in to comment.