Skip to content

add system variable 'tidb_enable_clustered_index' for v5.0#4385

Merged
TomShawn merged 10 commits into
pingcap:masterfrom
coocood:clustered_index
Sep 3, 2020
Merged

add system variable 'tidb_enable_clustered_index' for v5.0#4385
TomShawn merged 10 commits into
pingcap:masterfrom
coocood:clustered_index

Conversation

@coocood
Copy link
Copy Markdown
Member

@coocood coocood commented Aug 31, 2020

What is changed, added or deleted? (Required)

add system variable 'tidb_enable_clustered_index' for v5.0

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

  • master (the latest development version)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Have version specific changes
  • Might cause conflicts

@coocood
Copy link
Copy Markdown
Member Author

coocood commented Aug 31, 2020

@zhangjinpeng1987 PTAL

@TomShawn TomShawn added size/medium Changes of a medium size. status/PTAL This PR is ready for reviewing. translation/doing This PR’s assignee is translating this PR. v5.0 This PR/issue applies to TiDB v5.0 labels Aug 31, 2020
Comment thread system-variables.md Outdated
Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
- 这个变量用于控制是否开启 clustered index 特性。
- 该特性只适用于新创建的表,对于已经创建的旧表不会有影响。
- 该特性只适用于主键为单列非 INT 类型的表和主键为多列的表,对于无主键的表和主键是单列 INT 类型的表不会有影响。
- 特性启用以后,row value 会直接存储在主键上,而不再是存储在系统内部分配的 row key 上,然后用额外创建的主键索引指向 row key。
Copy link
Copy Markdown
Contributor

@TomShawn TomShawn Aug 31, 2020

Choose a reason for hiding this comment

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

Suggested change
- 特性启用以后,row value 会直接存储在主键上,而不再是存储在系统内部分配的 row key 上,然后用额外创建的主键索引指向 row key。
- 特性启用以后,行值会直接存储在主键上,而不再存储在系统内部分配的 row key 上(再用额外创建的主键索引指向该 row key

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why parenthesis?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

'行值' is used for different meanings in the doc.

Comment thread system-variables.md
Comment thread system-variables.md Outdated
对性能的影响主要体现在以下几个方面:
- 插入的时候会减少一个 index key 的写入。
- 使用主键做为等值条件查询的时候,会节省一次读取请求。
- 使用单列主键做为范围条件条件查询的时候,可以节省多次读取请求。
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- 使用单列主键做为范围条件条件查询的时候,可以节省多次读取请求。
- 使用单列主键做为范围条件查询的时候,可以节省多次读取请求。

Comment thread system-variables.md Outdated
- 这个变量用于控制是否开启 Clustered Index 特性。
- 该特性只适用于新创建的表,对于已经创建的旧表不会有影响。
- 该特性只适用于主键为单列非 INT 类型的表和主键为多列的表。对于无主键的表和主键是单列 INT 类型的表不会有影响。
- 特性启用以后,row value 会直接存储在主键上,而不再是存储在系统内部分配的 row key 上,并用额外创建的主键索引指向 row key。
Copy link
Copy Markdown
Contributor

@TomShawn TomShawn Aug 31, 2020

Choose a reason for hiding this comment

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

  • row value 和 row key 没有对应的中文表达吗?如果非术语,建议使用中文。
  • 如果并用额外创建的主键索引指向 row key是被不再是否定的一部分,这么写读者可能会认为不再是存储在系统内部分配的 row key 上并用额外创建的主键索引指向 row key是并列关系。

@coocood
Copy link
Copy Markdown
Member Author

coocood commented Sep 1, 2020

@TomShawn PTAL

Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
Comment thread system-variables.md Outdated
@TomShawn
Copy link
Copy Markdown
Contributor

TomShawn commented Sep 1, 2020

Rest LGTM

@coocood
Copy link
Copy Markdown
Member Author

coocood commented Sep 1, 2020

@TomShawn PTAL

Copy link
Copy Markdown
Contributor

@zhangjinpeng87 zhangjinpeng87 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-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 3, 2020
Copy link
Copy Markdown
Contributor

@TomShawn TomShawn 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-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 3, 2020
@TomShawn TomShawn assigned Joyinqin and unassigned ireneontheway Sep 3, 2020
@TomShawn TomShawn merged commit fbb7b3d into pingcap:master Sep 3, 2020
@coocood coocood deleted the clustered_index branch September 3, 2020 09:08
@Joyinqin
Copy link
Copy Markdown
Contributor

/label translation/done

@ti-srebot ti-srebot added the translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. label Sep 14, 2020
@Joyinqin
Copy link
Copy Markdown
Contributor

/unlabel translation/doing

@ti-srebot ti-srebot removed the translation/doing This PR’s assignee is translating this PR. label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/medium Changes of a medium size. status/LGT2 Indicates that a PR has LGTM 2. status/PTAL This PR is ready for reviewing. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. v5.0 This PR/issue applies to TiDB v5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants