Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documents for information_schema.tidb_index_usage and sys.schema_unused_index. #16511

Merged
merged 6 commits into from
Mar 19, 2024

Conversation

YangKeao
Copy link
Member

@YangKeao YangKeao commented Feb 5, 2024

What is changed, added or deleted? (Required)

Add the document for index usage related system tables and databases.

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

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions (in Chinese).

  • master (the latest development version)
  • v8.0 (TiDB 8.0 versions)
  • v7.6 (TiDB 7.6 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.4 (TiDB 7.4 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)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)
  • v5.0 (TiDB 5.0 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 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 Feb 5, 2024
@YangKeao YangKeao marked this pull request as draft February 5, 2024 06:14
@ti-chi-bot ti-chi-bot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 5, 2024
@Oreoxmt Oreoxmt added v8.0 This PR/issue applies to TiDB v8.0. translation/doing This PR’s assignee is translating this PR. labels Feb 6, 2024
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Feb 6, 2024
@Oreoxmt Oreoxmt self-requested a review February 6, 2024 07:37
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2024
@Oreoxmt Oreoxmt self-assigned this Feb 27, 2024
@YangKeao YangKeao marked this pull request as ready for review February 28, 2024 02:48
@ti-chi-bot ti-chi-bot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 28, 2024
@YangKeao YangKeao requested a review from qw4990 February 28, 2024 05:14
@Oreoxmt Oreoxmt added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Feb 28, 2024
TOC.md Outdated Show resolved Hide resolved
information-schema/information-schema-tidb-index-usage.md Outdated Show resolved Hide resolved
information-schema/information-schema-tidb-index-usage.md Outdated Show resolved Hide resolved
information-schema/information-schema-tidb-index-usage.md Outdated Show resolved Hide resolved
information-schema/information-schema-tidb-index-usage.md Outdated Show resolved Hide resolved
sys-schema.md Outdated Show resolved Hide resolved
sys-schema.md Outdated Show resolved Hide resolved
sys-schema.md Outdated Show resolved Hide resolved
sys-schema.md Outdated Show resolved Hide resolved
Signed-off-by: Yang Keao <[email protected]>
* `INDEX_NAME`:索引的名称。
* `QUERY_TOTAL`:访问该索引的语句总数。
* `KV_REQ_TOTAL`:访问该索引时产生的 KV 请求总数。
* `ROWS_ACCESS_TOTAL`:访问该索引时扫描的总行数。
Copy link
Contributor

Choose a reason for hiding this comment

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

对于大表,这个字段一直累加会不会有溢出的风险?需要特殊说明吗

Copy link
Member Author

Choose a reason for hiding this comment

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

假设集群每秒钟总共扫描 0xFFFFFFFF 行,uint64 在 0xFFFFFFFF s = 136.19252 年的时候才会溢出,现在看应该没啥风险 🤔 。

Copy link
Contributor

@qw4990 qw4990 left a comment

Choose a reason for hiding this comment

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

REST LGTM

Copy link

ti-chi-bot bot commented Mar 5, 2024

@qw4990: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

REST LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 5, 2024
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Mar 5, 2024

/cc @hfxsd

@ti-chi-bot ti-chi-bot bot requested a review from hfxsd March 5, 2024 06:32
@Oreoxmt Oreoxmt added the type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. label Mar 5, 2024
information-schema/information-schema-tidb-index-usage.md Outdated Show resolved Hide resolved
information-schema/information-schema-tidb-index-usage.md Outdated Show resolved Hide resolved
information-schema/information-schema.md Outdated Show resolved Hide resolved
sys-schema.md Show resolved Hide resolved
information-schema/information-schema.md Outdated Show resolved Hide resolved
sys-schema.md Outdated Show resolved Hide resolved
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Mar 5, 2024
Copy link

ti-chi-bot bot commented Mar 5, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-03-05 06:32:18.296308666 +0000 UTC m=+148765.318555049: ☑️ agreed by Oreoxmt.
  • 2024-03-05 06:57:59.715702758 +0000 UTC m=+150306.737949146: ☑️ agreed by hfxsd.

@YangKeao
Copy link
Member Author

YangKeao commented Mar 5, 2024

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2024
Signed-off-by: Yang Keao <[email protected]>
@YangKeao
Copy link
Member Author

YangKeao commented Mar 5, 2024

/unhold

@ti-chi-bot ti-chi-bot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 5, 2024
@Oreoxmt Oreoxmt mentioned this pull request Mar 5, 2024
18 tasks
Copy link
Member

@bb7133 bb7133 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Mar 5, 2024

@bb7133: adding LGTM is restricted to approvers and reviewers in OWNERS files.

In response to this:

LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Signed-off-by: Yang Keao <[email protected]>
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Mar 19, 2024

/approve

Copy link

ti-chi-bot bot commented Mar 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Oreoxmt

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

The pull request process is described here

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

@ti-chi-bot ti-chi-bot bot added the approved label Mar 19, 2024
@ti-chi-bot ti-chi-bot bot merged commit 34e1446 into pingcap:master Mar 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/L Denotes a PR that changes 100-499 lines, ignoring generated files. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. type/compatibility-or-feature-change This PR involves compatibility changes or feature behavior changes. v8.0 This PR/issue applies to TiDB v8.0.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants