Conflicting guidance on combining Instance Plan Cache with session-level plan caches
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 617
- Forks
- 724
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 223
Description
Error Report
- What is the URL/path of the document related to this issue?
- https://docs.pingcap.com/tidb/dev/tidb-performance-tuning-config (
tidb-performance-tuning-config.md) - https://docs.pingcap.com/tidb/dev/system-variables#tidb_enable_instance_plan_cache-new-in-v840 (
system-variables.md)
- How would you like to improve it?
tidb-performance-tuning-config.md recommends enabling tidb_enable_instance_plan_cache (Instance Plan Cache) and tidb_enable_non_prepared_plan_cache (session-level Non-prepared plan cache) together, in the same recommended SQL block and settings table:
SET GLOBAL tidb_enable_instance_plan_cache=on;
SET GLOBAL tidb_instance_plan_cache_max_size=2GiB;
SET GLOBAL tidb_enable_non_prepared_plan_cache=on;
However, the tidb_enable_instance_plan_cache variable's own description in system-variables.md says the opposite:
Before enabling Instance Plan Cache, it is recommended to disable session-level Prepared execution plan cache and Non-prepared execution plan cache.
These two pages give contradictory guidance on whether Instance Plan Cache and the session-level prepared/non-prepared plan caches should be combined or should be mutually exclusive. Could someone with knowledge of the actual TiDB behavior clarify which guidance is correct, so both pages can be reconciled?
(Found while reviewing the Japanese translation of tidb-performance-tuning-config.md; the JA translation faithfully mirrors this same inconsistency from the English source, so this is an English-source content issue, not a translation defect.)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing tidb-performance-tuning-config.md with the tidb_enable_instance_plan_cache section in system-variables.md, then verify the actual interaction with prepared and non-prepared session-level plan caches. Done means confirming the correct guidance and reconciling the conflicting English documentation; the issue notes that the Japanese page mirrors the English inconsistency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100