Skip to content

docs: refresh TopSQL docs and screenshots#22559

Open
yibin87 wants to merge 8 commits intopingcap:masterfrom
yibin87:update_topsql_page
Open

docs: refresh TopSQL docs and screenshots#22559
yibin87 wants to merge 8 commits intopingcap:masterfrom
yibin87:update_topsql_page

Conversation

@yibin87
Copy link
Contributor

@yibin87 yibin87 commented Mar 13, 2026

What is changed, added or deleted? (Required)

  • Refresh dashboard/top-sql.md to match the current pingcap/tidb-dashboard behavior for TopSQL.
  • Update the English TopSQL doc to cover Top 5/20/100, Order By CPU / Order By Network / Order By Logical IO, TiKV By Query / By Table / By DB / By Region, and the enable/disable behavior for TiKV network IO collection.
  • Re-shoot and replace the English TopSQL screenshots with the current English UI.
  • Add two new screenshots to explicitly show the Order By dropdown and the TopSQL settings drawer for enabling TiKV Network IO collection.
  • Update the Monitor TopSQL section in tidb-cloud/tidb-cloud-clinic.md so it describes multi-dimensional hotspot analysis instead of CPU-only analysis.

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)
  • v6.1 (TiDB 6.1 versions)
  • v5.4 (TiDB 5.4 versions)

What is the related PR or file link(s)?

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

@ti-chi-bot ti-chi-bot bot added the missing-translation-status This PR does not have translation status info. label Mar 13, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly updates the documentation for the TiDB Dashboard Top SQL feature. The changes aim to provide users with a more accurate and comprehensive guide to leveraging Top SQL's advanced capabilities, including multi-dimensional analysis for TiKV instances and improved resource consumption insights.

Highlights

  • Documentation Refresh: Updated the dashboard/top-sql.md documentation to accurately reflect the current behavior and features of the TiDB Dashboard Top SQL page.
  • Expanded Functionality Coverage: Expanded the documentation to cover new functionalities such as displaying Top 5/20/100 records, sorting by CPU, Network, or Logical IO, and aggregating data by Query, Table, DB, or Region for TiKV instances.
  • TiKV Network IO Collection: Included detailed instructions and explanations for enabling and disabling TiKV Network IO collection, including configuration for new TiKV nodes.
  • Screenshot Updates: Replaced outdated screenshots with new ones that match the current English UI and added specific screenshots for the Order By dropdown and TiKV Network IO collection settings.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • dashboard/top-sql.md
    • Refreshed the summary and introductory text to highlight the expanded capabilities of Top SQL, including network and logical IO analysis.
    • Updated the list of features to include options for displaying Top 5/20/100 records, sorting by CPU, Network, or Logical IO, and aggregating by Query, Table, DB, or Region.
    • Revised recommended scenarios to align with the new multi-dimensional analysis features.
    • Clarified the process for enabling Top SQL and added a new section for enabling TiKV Network IO collection, including configuration for TiUP.
    • Restructured and expanded the "Use Top SQL" section with more detailed steps, new observation modes, and updated screenshots.
    • Updated the "Disable Top SQL" section to include disabling TiKV Network IO collection.
    • Revised and added new entries to the "Frequently asked questions" section, addressing Others meaning, performance impact with network IO collection, Y-axis meaning, and troubleshooting for network IO data.
Activity
  • No human activity has been recorded yet for this pull request.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ti-chi-bot ti-chi-bot bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Mar 13, 2026
Copy link
Contributor

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

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 provides a comprehensive update to the Top SQL documentation, aligning it with the latest features and improving overall clarity. The changes are well-executed, particularly the addition of details on new metrics and the refreshed screenshots. I have offered two minor suggestions to enhance readability and consistency, in line with the repository's documentation style guide.

Comment on lines +113 to 117
When a TiKV instance is selected and **TiKV Network IO collection (multi-dimensional)** is enabled, the `Order By` drop-down list shows `Order By CPU`, `Order By Network`, and `Order By Logical IO`.

Select a TiKV instance, and then select **By TABLE** or **By DB**:
![Select order by](/media/dashboard/top-sql-usage-select-order-by.png)

![Select aggregation dimension](/media/dashboard/top-sql-usage-select-agg-by.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

low

For better readability and to properly introduce both screenshots, consider combining the introduction for both the Order By and aggregation dimension dropdowns into a single sentence. This makes the connection between the text and the images clearer.

Suggested change
When a TiKV instance is selected and **TiKV Network IO collection (multi-dimensional)** is enabled, the `Order By` drop-down list shows `Order By CPU`, `Order By Network`, and `Order By Logical IO`.
Select a TiKV instance, and then select **By TABLE** or **By DB**:
![Select order by](/media/dashboard/top-sql-usage-select-order-by.png)
![Select aggregation dimension](/media/dashboard/top-sql-usage-select-agg-by.png)
When a TiKV instance is selected and **TiKV Network IO collection (multi-dimensional)** is enabled, you can see more options in the `Order By` and aggregation dimension drop-down lists.
![Select order by](/media/dashboard/top-sql-usage-select-order-by.png)
![Select aggregation dimension](/media/dashboard/top-sql-usage-select-agg-by.png)
References
  1. The style guide emphasizes clarity and simplicity. The suggested change improves the flow by introducing both screenshots with a single, clear sentence. (link)

## Frequently asked questions

**1. Top SQL cannot be enabled and the UI displays "required component NgMonitoring is not started"**.
**1. Top SQL cannot be enabled and the UI displays "required component NgMonitoring is not started".**
Copy link
Contributor

Choose a reason for hiding this comment

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

low

For consistency with other FAQ items, which are phrased as questions, consider rephrasing this statement into a question. This improves the logical flow of the FAQ section.

Suggested change
**1. Top SQL cannot be enabled and the UI displays "required component NgMonitoring is not started".**
**1. Why can't I enable Top SQL, and why does the UI display "required component NgMonitoring is not started"?**
References
  1. The style guide mentions maintaining a logical flow. Phrasing all FAQ items as questions improves consistency and logical flow. (link)

@yibin87 yibin87 changed the title dashboard: refresh Top SQL docs and screenshots docs: refresh Top SQL docs and screenshots Mar 13, 2026
@yibin87 yibin87 changed the title docs: refresh Top SQL docs and screenshots docs: refresh TopSQL docs and screenshots Mar 13, 2026
@ti-chi-bot
Copy link

ti-chi-bot bot commented Mar 13, 2026

[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 hfxsd. 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

@hfxsd hfxsd added translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3. and removed missing-translation-status This PR does not have translation status info. labels Mar 13, 2026
@hfxsd hfxsd assigned qiancai and unassigned hfxsd Mar 13, 2026
@hfxsd hfxsd requested a review from qiancai March 13, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/from-docs-cn This PR is translated from a PR in pingcap/docs-cn. v9.0-beta.3 This PR/issue applies to TiDB v9.0-beta.3.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants