Skip to content

Add new Index advisor user doc #19867

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

Merged
merged 39 commits into from
Feb 20, 2025
Merged

Add new Index advisor user doc #19867

merged 39 commits into from
Feb 20, 2025

Conversation

qw4990
Copy link
Contributor

@qw4990 qw4990 commented Jan 2, 2025

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.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.4 (TiDB 8.4 versions)
  • v8.3 (TiDB 8.3 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)?

  • 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 2, 2025
@Oreoxmt Oreoxmt self-assigned this Jan 2, 2025
@Oreoxmt Oreoxmt self-requested a review January 2, 2025 08:16
@Oreoxmt Oreoxmt added translation/doing This PR's assignee is translating this PR. v9.0-beta.1 This PR/issue applies to TiDB v9.0-beta.1. labels Jan 2, 2025
@ti-chi-bot ti-chi-bot bot removed the missing-translation-status This PR does not have translation status info. label Jan 2, 2025
@Oreoxmt Oreoxmt added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 2, 2025
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Jan 2, 2025

@qw4990 Could you please invite a tech reviewer? Thanks!

@Oreoxmt Oreoxmt added the needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. label Jan 2, 2025
index-advisor.md Outdated
mysql> CREATE TABLE t(a int, b int, c int);
mysql> RECOMMEND INDEX RUN for "select a, b from t where a=1 and b=1";
+----------+-------+------------+---------------+------------+----------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------+---------------------------------+
| database | table | index_name | index_columns | index_size | reason | top_impacted_query | create_index_statement |
Copy link
Contributor

Choose a reason for hiding this comment

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

  • If "index_size" is not exact value, better to rename it with "est_index_size".
  • It's recommended to append meaningful string as suffix of index name, so that we are able to understand it's from index advisor. Name conflict can be avoid as well. For example "idx_..._<trailing 8 chars in plan digest>

Copy link
Contributor

Choose a reason for hiding this comment

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

index_size is the maximum number of columns an index can have. May be we can rename to reflect that, say "max_index_columns".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The first suggestion has been accepted, but for the second one, it's hard to associate the Index with a specific plan and use the plan digest as the index name since there might be multiple queries affected by this Index.

Copy link
Collaborator

@qiancai qiancai 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

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 20, 2025
Copy link

ti-chi-bot bot commented Feb 20, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-02-19 10:06:20.991351818 +0000 UTC m=+1042223.387573872: ☑️ agreed by Oreoxmt.
  • 2025-02-20 09:35:10.296815078 +0000 UTC m=+1126752.693037140: ☑️ agreed by qiancai.

@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Feb 20, 2025

/approve

Copy link

ti-chi-bot bot commented Feb 20, 2025

[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 Feb 20, 2025
@Oreoxmt
Copy link
Collaborator

Oreoxmt commented Feb 20, 2025

/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 Feb 20, 2025
@ti-chi-bot ti-chi-bot bot merged commit a64ef79 into pingcap:master Feb 20, 2025
9 checks passed
ti-chi-bot pushed a commit to ti-chi-bot/docs that referenced this pull request Feb 20, 2025
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #20343.

ti-chi-bot bot pushed a commit that referenced this pull request Feb 20, 2025
@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 Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. 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. v9.0-beta.1 This PR/issue applies to TiDB v9.0-beta.1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants