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

partition: add doc for global index #17979

Closed
wants to merge 13 commits into from

Conversation

Defined2014
Copy link
Contributor

@Defined2014 Defined2014 commented Jun 20, 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.

  • master (the latest development version)
  • v8.3 (TiDB 8.3 versions)
  • v8.2 (TiDB 8.2 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)?

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

@Defined2014 Defined2014 requested a review from mjonss June 20, 2024 09:45
@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 20, 2024
Copy link
Contributor

@mjonss mjonss left a comment

Choose a reason for hiding this comment

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

LGTM, should we also update information-schema/information-schema-tidb-indexes.md or should we do that in a separate PR?

partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Show resolved Hide resolved
partitioned-table.md Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Jun 20, 2024

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

In response to this:

LGTM, should we also update information-schema/information-schema-tidb-indexes.md or should we do that in a separate PR?

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.

Defined2014 and others added 4 commits June 21, 2024 10:23
Co-authored-by: Mattias Jonsson <mjonss@users.noreply.github.com>
Co-authored-by: Mattias Jonsson <mjonss@users.noreply.github.com>
Co-authored-by: Mattias Jonsson <mjonss@users.noreply.github.com>
@Defined2014 Defined2014 changed the title partition: support global index partition: add doc for global index Jun 24, 2024
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
Co-authored-by: Daniël van Eeden <github@myname.nl>
Co-authored-by: Daniël van Eeden <github@myname.nl>
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jul 5, 2024
Copy link

ti-chi-bot bot commented Jul 5, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-07-05 07:51:10.090148576 +0000 UTC m=+1569996.575637409: ☑️ agreed by dveeden.

Copy link

ti-chi-bot bot commented Jul 9, 2024

@dveeden: Your lgtm message is repeated, so it is ignored.

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 self-assigned this Jul 24, 2024
@hfxsd hfxsd added the v8.3 label Jul 24, 2024
@hfxsd hfxsd added translation/doing This PR's assignee is translating this PR. and removed missing-translation-status This PR does not have translation status info. labels Jul 24, 2024
@hfxsd hfxsd self-requested a review July 24, 2024 09:13
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
partitioned-table.md Outdated Show resolved Hide resolved
placement-rules-in-sql.md Outdated Show resolved Hide resolved
placement-rules-in-sql.md Outdated Show resolved Hide resolved
placement-rules-in-sql.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved
Copy link

ti-chi-bot bot commented Jul 31, 2024

[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, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@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 Aug 1, 2024
placement-rules-in-sql.md Outdated Show resolved Hide resolved
system-variables.md Outdated Show resolved Hide resolved

If you need to create unique indexes that **do not include all the columns used in the partition expressions**, you can achieve this by enabling the [`tidb_enable_global_index`](/system-variables.md#tidb_enable_global_index-new-in-v760) system variable.

Previously an index on partitioned tables are created for each partition, which is the reason for the limitation that all unique keys need to include all partitioning columns. The uniqueness can only be enforced within each partition. A global index will be created on table level, so it can enforce uniqueness regardless of partitioning. Note that this has implications on partitioning management, `DROP`, `TRUNCATE`, and `REORGANIZE PARTITION` will also need to manage the table level global index.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Previously an index on partitioned tables are created for each partition, which is the reason for the limitation that all unique keys need to include all partitioning columns. The uniqueness can only be enforced within each partition. A global index will be created on table level, so it can enforce uniqueness regardless of partitioning. Note that this has implications on partitioning management, `DROP`, `TRUNCATE`, and `REORGANIZE PARTITION` will also need to manage the table level global index.
Previously an index on partitioned tables are created for each partition, which is the reason for the limitation that all unique keys need to include all partition keys. The uniqueness can only be enforced within each partition. A global index will be created on table level, so it can enforce uniqueness regardless of partitioning. Note that this has implications on partitioning management, `DROP`, `TRUNCATE`, and `REORGANIZE PARTITION` will also need to manage the table level global index.

@hfxsd
Copy link
Collaborator

hfxsd commented Aug 12, 2024

Replaced by #18543

@hfxsd hfxsd closed this Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-1-more-lgtm Indicates a PR needs 1 more LGTM. size/M Denotes a PR that changes 30-99 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.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants