pingcap / pingcap/docs

Conflicting guidance on combining Instance Plan Cache with session-level plan caches

Open
#23,814 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
617
Forks
724
Avg merge
2d 10h
Merged PRs (30d)
223

Description

Error Report

  1. What is the URL/path of the document related to this issue?
  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.