Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update documents related to Plan Cache #9553

Merged
merged 24 commits into from
May 27, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update sql-prepared-plan-cache.md
Co-authored-by: Ran <huangran.alex@gmail.com>
qw4990 and ran-huang authored May 25, 2022
commit 572ec2967ce7595e0fd201f009b32860f70827ca
2 changes: 1 addition & 1 deletion sql-prepared-plan-cache.md
Original file line number Diff line number Diff line change
@@ -138,7 +138,7 @@ MySQL [test]> select @@last_plan_from_cache;

比如目前 TiDB 实例的 `SESSION` 并发数是 50,平均每个 `SESSION` 大致缓存 100 个计划,则总内存开销为 `50 * 100 * 100KiB` 约等于 `500mb`。

目前可以通过变量 `tidb_prepared_plan_cache_size` 来设置每个 `SESSION` 最多缓存的计划数量,针对不同的环境,推荐的设置如下:
目前可以通过变量 `tidb_prepared_plan_cache_size` 来设置每个 `SESSION` 最多缓存的计划数量针对不同的环境,推荐的设置如下:

- MEM <= 64 GB; tidb_prepared_plan_cache_size = 50
- MEM > 64 GB; tidb_prepared_plan_cache_size = 100