Add optimizer issue handling experience to TiDB query tuning#13
Merged
hawkingrei merged 2 commits intomainfrom Mar 14, 2026
Merged
Add optimizer issue handling experience to TiDB query tuning#13hawkingrei merged 2 commits intomainfrom
hawkingrei merged 2 commits intomainfrom
Conversation
qw4990
approved these changes
Mar 13, 2026
fbf4088 to
dae1271
Compare
dae1271 to
660d49b
Compare
terry1purcell
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds optimizer issue-handling experience to the
tidb-query-tuningskill.It expands the skill from pure topic references into a mixed knowledge base that now includes:
What Changed
skills/tidb-query-tuning/references/optimizer-oncall-experiences-redacted/skills/tidb-query-tuning/references/tidb-customer-planner-issues/skills/tidb-query-tuning/SKILL.mdso the skill points to topic docs, redacted field cases, and issue-derived precedentsskills/tidb-query-tuning/AGENTS.mdwith guidance on when and how to mine GitHub issue experienceskills/tidb-query-tuning/scripts/generate_tidb_issue_experiences.pyto generate one-issue-one-file markdown corpora from GitHub issue and PR historyWhy
General tuning guidance is not enough for many optimizer problems. A lot of useful handling knowledge exists in field incidents and customer-reported issues:
This PR makes that knowledge available from the skill itself instead of leaving it in ad hoc output directories.
Validation
python3 skills/tidb-query-tuning/scripts/generate_tidb_issue_experiences.py --helppython3 -m py_compile skills/tidb-query-tuning/scripts/generate_tidb_issue_experiences.pyNotes
outputs/was intentionally left out of the tracked changes. The generated issue corpus now lives under the skill'sreferences/directory.