Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions reference/configuration/tidb-server/configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,12 @@ TiDB 配置文件比命令行参数支持更多的选项。你可以在 [config/
+ 默认值:0
+ 这个配置只有在 prepared-plan-cache.enabled 为 true 的情况才会生效。在 LRU 的 size 大于 prepared-plan-cache.capacity 的情况下,也会剔除 LRU 中的元素。

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

+ TiDB 事务大小限制
+ 默认值:104857600 (Byte)
+ 单个事务中,所有 key-value 记录的总大小不能超过该限制。注意,如果开启了 `binlog`,该配置项的值不能超过 `104857600`(表示 100MB),因为 binlog 组件不支持同步的事务过大。如果 `binlog` 没开启,该配置项的最大值不超过 `10737418240`(表示 10GB)。

### `stmt-count-limit`

+ TiDB 一个事务允许的最大语句条数限制。
Expand Down
2 changes: 2 additions & 0 deletions reference/transactions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,5 @@ COMMIT;
为了使性能达到最优,建议每 100~500 行写入一个事务。

TiDB 设置了单个事务的键值对的总大小不超过 100 MB,这个默认值可以通过配置文件中的配置项 `txn-total-size-limit` 进行修改,最大支持到 10GB。实际的单个事务大小限制还取决于用户的内存,执行大事务时 TiDB 进程的内存消耗大约是事务大小 6 倍以上。

在 4.0 以前的版本,TiDB 限制了单个事务的键值对的总数量不超过 30 万条,在 4.0 之后的版本没有这项限制。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this part in #2002.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole block is missing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tiancaiamao The missing part is aligned in pingcap/docs#2280. PTAL