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

planner: update the doc about Plan Cache #17315

Merged
merged 16 commits into from
Jul 1, 2024

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented May 10, 2024

First-time contributors' checklist

What is changed, added or deleted? (Required)

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.2 (TiDB 8.1 versions)
  • v8.1 (TiDB 8.1 versions)
  • v8.0 (TiDB 8.0 versions)
  • v7.6 (TiDB 7.6 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)
  • v5.3 (TiDB 5.3 versions)
  • v5.2 (TiDB 5.2 versions)
  • v5.1 (TiDB 5.1 versions)

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

  • This PR is translated from:
  • Other reference 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/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 10, 2024
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 20, 2024
@hfxsd hfxsd self-assigned this Jun 11, 2024
@hfxsd hfxsd self-requested a review June 11, 2024 06:55
@hfxsd hfxsd added translation/doing This PR’s assignee is translating this PR. v8.2 and removed missing-translation-status This PR does not have translation status info. labels Jun 11, 2024
@hfxsd hfxsd requested a review from songrijie June 11, 2024 06:56
optimizer-hints.md Outdated Show resolved Hide resolved
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
@songrijie
Copy link
Contributor

还需要向 https://docs.pingcap.com/zh/tidb/stable/statement-summary-tables 增加字段说明

qw4990 and others added 2 commits June 17, 2024 11:58
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
@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 Jun 17, 2024
Copy link
Member

@time-and-fate time-and-fate left a comment

Choose a reason for hiding this comment

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

其它 LGTM

@@ -279,6 +279,8 @@ SQL 的基础信息:
- `BINARY_PLAN`:以二进制格式编码后的原执行计划,存在多条语句时,只取其中一条语句的执行计划。用 `select tidb_decode_binary_plan('xxx...')` SQL 语句可以解析出具体的执行计划。
- `PLAN_CACHE_HITS`:这类 SQL 语句命中 plan cache 的总次数
- `PLAN_IN_CACHE`:这类 SQL 语句的上次执行是否命中了 plan cache
- `PLAN_CACHE_UNQUALIFIED`:这类 SQL 没法命中 Plan Cache 的次数
Copy link
Member

Choose a reason for hiding this comment

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

这个和总执行次数减去 PLAN_CACHE_HITS 的区别是什么呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

一是单独用个字段清晰点,用户不太会仔细思考去做加减法,二是语义上有点不同,如果是 cache 满了导致无法命中,而不是查询本身收到限制导致无法命中,不会被记录在里面; @time-and-fate

Copy link
Member

Choose a reason for hiding this comment

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

好的

Copy link

ti-chi-bot bot commented Jun 17, 2024

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

In response to this:

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.

@hfxsd hfxsd 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 Jun 20, 2024
optimizer-hints.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
optimizer-hints.md Outdated Show resolved Hide resolved
statement-summary-tables.md Outdated Show resolved Hide resolved
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
Copy link
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

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

/lgtm

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 21, 2024
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 21, 2024
Copy link

ti-chi-bot bot commented Jun 21, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-06-21 08:47:13.796353061 +0000 UTC m=+363760.281841885: ☑️ agreed by lilin90.
  • 2024-06-21 08:52:38.739165261 +0000 UTC m=+364085.224654102: ☑️ agreed by hfxsd.

optimizer-hints.md Outdated Show resolved Hide resolved
statement-summary-tables.md Outdated Show resolved Hide resolved
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
sql-prepared-plan-cache.md Outdated Show resolved Hide resolved
@hfxsd
Copy link
Collaborator

hfxsd commented Jul 1, 2024

/approve

Copy link

ti-chi-bot bot commented Jul 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hfxsd

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 Jul 1, 2024
@ti-chi-bot ti-chi-bot bot merged commit 4c96453 into pingcap:master Jul 1, 2024
7 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. v8.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants