Skip to content

docs: add statement summary system variables - #23001

Open
nolouch wants to merge 10 commits into
pingcap:masterfrom
nolouch:add-docs-about-stmt
Open

docs: add statement summary system variables#23001
nolouch wants to merge 10 commits into
pingcap:masterfrom
nolouch:add-docs-about-stmt

Conversation

@nolouch

@nolouch nolouch commented Jun 3, 2026

Copy link
Copy Markdown
Member

What is changed

This PR is translated from: pingcap/docs-cn#21694

Add English documentation for two statement summary system variables, corresponding to pingcap/docs-cn#21694:

  • tidb_stmt_summary_group_by_user
  • tidb_stmt_summary_persist_evicted

Updated files:

  • statement-summary-tables.md
  • system-variables.md
  • system-variable-reference.md

Check List

Tests:

  • ./scripts/markdownlint statement-summary-tables.md system-variable-reference.md system-variables.md
  • git diff --check -- statement-summary-tables.md system-variable-reference.md system-variables.md

Summary by CodeRabbit

  • New Features

    • Added a setting to group statement summaries by executing user.
    • Added an option to preserve LRU-evicted statement summary records with an evicted marker.
    • Documented defaults and availability across TiDB and TiDB Cloud editions, including Support requirements for modifying read-only settings.
  • Documentation

    • Added system-variable references and links for both statement summary settings.
    • Clarified the location and presentation of the eviction-related documentation note.

@ti-chi-bot ti-chi-bot Bot added missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 3, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds documentation for two new system variables introduced in TiDB v8.5.7: tidb_stmt_summary_group_by_user and tidb_stmt_summary_persist_evicted. The changes span across statement-summary-tables.md, system-variable-reference.md, and system-variables.md. The review comments suggest rewriting several sentences to use the active voice, reducing wordiness, and using "who" instead of "that" when referring to users, in alignment with the repository's documentation style guide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
@lilin90 lilin90 added the translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. label Jun 12, 2026
@lilin90 lilin90 self-assigned this Jun 12, 2026
@ti-chi-bot ti-chi-bot Bot removed the missing-translation-status This PR does not have translation status info. label Jun 12, 2026
@lilin90 lilin90 added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Jun 12, 2026
@CLAassistant

CLAassistant commented Aug 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@qiancai qiancai assigned qiancai and unassigned lilin90 Aug 20, 2026
@qiancai
qiancai self-requested a review August 20, 2026 06:11
Comment thread system-variables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread system-variables.md Outdated
@ti-chi-bot

ti-chi-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from qiancai. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 88bef9a9-dd18-4efc-a163-699c9594bf59

📥 Commits

Reviewing files that changed from the base of the PR and between eb39905 and 8f92301.

📒 Files selected for processing (1)
  • statement-summary-tables.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • statement-summary-tables.md

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The documentation adds two GLOBAL statement summary variables. It describes user-based aggregation, LRU-evicted record persistence, defaults, memory effects, log output, history query behavior, and TiDB Cloud restrictions.

Changes

Statement summary configuration

Layer / File(s) Summary
System variable references and definitions
system-variables.md, system-variable-reference.md
Adds both GLOBAL Boolean variables with defaults, effects, TiDB Cloud restrictions, and related links.
Statement summary behavior
statement-summary-tables.md
Documents user aggregation, SAMPLE_USER, in-memory clearing, persisted eviction logs, increased log volume, and exclusion from history queries.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 8f923

This PR adds documentation for two statement summary system variables without changing product behavior or runtime configuration; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit checks each summary note
Two new settings now take root
Users shape the records
Evictions mark the logs
Clear guidance keeps the tables clear

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding statement summary system variables to the documentation.
Description check ✅ Passed The description explains the changes, identifies the affected files, provides the translated source PR, and records completed checks. It omits the required affected-version checklist and other templat…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the changes, identifies the affected files, provides the translated source PR, and records completed checks. It omits the required affected-version checklist and other template checklists, but it is otherwise sufficiently complete and on topic.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread system-variables.md
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread system-variables.md
Comment thread system-variables.md
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread statement-summary-tables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants